<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><link rel="stylesheet" type="text/css" href="style.css" /><script type="text/javascript" src="highlight.js"></script></head><body><pre><span class="hs-pragma">{-# LANGUAGE FlexibleContexts #-}</span><span>
</span><span id="line-2"></span><span class="hs-pragma">{-# LANGUAGE RankNTypes #-}</span><span>
</span><span id="line-3"></span><span>
</span><span id="line-4"></span><span class="hs-comment">-----------------------------------------------------------------------------</span><span>
</span><span id="line-5"></span><span class="hs-comment">-- |</span><span>
</span><span id="line-6"></span><span class="hs-comment">-- Module      :  Distribution.Simple.Register</span><span>
</span><span id="line-7"></span><span class="hs-comment">-- Copyright   :  Isaac Jones 2003-2004</span><span>
</span><span id="line-8"></span><span class="hs-comment">-- License     :  BSD3</span><span>
</span><span id="line-9"></span><span class="hs-comment">--</span><span>
</span><span id="line-10"></span><span class="hs-comment">-- Maintainer  :  cabal-devel@haskell.org</span><span>
</span><span id="line-11"></span><span class="hs-comment">-- Portability :  portable</span><span>
</span><span id="line-12"></span><span class="hs-comment">--</span><span>
</span><span id="line-13"></span><span class="hs-comment">-- This module deals with registering and unregistering packages. There are a</span><span>
</span><span id="line-14"></span><span class="hs-comment">-- couple ways it can do this, one is to do it directly. Another is to generate</span><span>
</span><span id="line-15"></span><span class="hs-comment">-- a script that can be run later to do it. The idea here being that the user</span><span>
</span><span id="line-16"></span><span class="hs-comment">-- is shielded from the details of what command to use for package registration</span><span>
</span><span id="line-17"></span><span class="hs-comment">-- for a particular compiler. In practice this aspect was not especially</span><span>
</span><span id="line-18"></span><span class="hs-comment">-- popular so we also provide a way to simply generate the package registration</span><span>
</span><span id="line-19"></span><span class="hs-comment">-- file which then must be manually passed to @ghc-pkg@. It is possible to</span><span>
</span><span id="line-20"></span><span class="hs-comment">-- generate registration information for where the package is to be installed,</span><span>
</span><span id="line-21"></span><span class="hs-comment">-- or alternatively to register the package in place in the build tree. The</span><span>
</span><span id="line-22"></span><span class="hs-comment">-- latter is occasionally handy, and will become more important when we try to</span><span>
</span><span id="line-23"></span><span class="hs-comment">-- build multi-package systems.</span><span>
</span><span id="line-24"></span><span class="hs-comment">--</span><span>
</span><span id="line-25"></span><span class="hs-comment">-- This module does not delegate anything to the per-compiler modules but just</span><span>
</span><span id="line-26"></span><span class="hs-comment">-- mixes it all in this module, which is rather unsatisfactory. The script</span><span>
</span><span id="line-27"></span><span class="hs-comment">-- generation and the unregister feature are not well used or tested.</span><span>
</span><span id="line-28"></span><span>
</span><span id="line-29"></span><span class="hs-keyword">module</span><span> </span><span class="hs-identifier">Distribution.Simple.Register</span><span> </span><span class="hs-special">(</span><span>
</span><span id="line-30"></span><span>    </span><span class="annot"><a href="Distribution.Simple.Register.html#register"><span class="hs-identifier">register</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-31"></span><span>    </span><span class="annot"><a href="Distribution.Simple.Register.html#unregister"><span class="hs-identifier">unregister</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-32"></span><span>
</span><span id="line-33"></span><span>    </span><span class="annot"><a href="Distribution.Simple.Register.html#internalPackageDBPath"><span class="hs-identifier">internalPackageDBPath</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-34"></span><span>
</span><span id="line-35"></span><span>    </span><span class="annot"><a href="Distribution.Simple.Register.html#initPackageDB"><span class="hs-identifier">initPackageDB</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-36"></span><span>    </span><span class="annot"><a href="Distribution.Simple.Register.html#doesPackageDBExist"><span class="hs-identifier">doesPackageDBExist</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-37"></span><span>    </span><span class="annot"><a href="Distribution.Simple.Register.html#createPackageDB"><span class="hs-identifier">createPackageDB</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-38"></span><span>    </span><span class="annot"><a href="Distribution.Simple.Register.html#deletePackageDB"><span class="hs-identifier">deletePackageDB</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-39"></span><span>
</span><span id="line-40"></span><span>    </span><span class="annot"><a href="Distribution.Simple.Register.html#abiHash"><span class="hs-identifier">abiHash</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-41"></span><span>    </span><span class="annot"><a href="Distribution.Simple.Register.html#invokeHcPkg"><span class="hs-identifier">invokeHcPkg</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-42"></span><span>    </span><span class="annot"><a href="Distribution.Simple.Register.html#registerPackage"><span class="hs-identifier">registerPackage</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-43"></span><span>    </span><span class="annot"><a href="Distribution.Simple.Program.HcPkg.html#RegisterOptions"><span class="hs-identifier">HcPkg.RegisterOptions</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span>
</span><span id="line-44"></span><span>    </span><span class="annot"><a href="Distribution.Simple.Program.HcPkg.html#defaultRegisterOptions"><span class="hs-identifier">HcPkg.defaultRegisterOptions</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-45"></span><span>    </span><span class="annot"><a href="Distribution.Simple.Register.html#generateRegistrationInfo"><span class="hs-identifier">generateRegistrationInfo</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-46"></span><span>    </span><span class="annot"><a href="Distribution.Simple.Register.html#inplaceInstalledPackageInfo"><span class="hs-identifier">inplaceInstalledPackageInfo</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-47"></span><span>    </span><span class="annot"><a href="Distribution.Simple.Register.html#absoluteInstalledPackageInfo"><span class="hs-identifier">absoluteInstalledPackageInfo</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-48"></span><span>    </span><span class="annot"><a href="Distribution.Simple.Register.html#generalInstalledPackageInfo"><span class="hs-identifier">generalInstalledPackageInfo</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-49"></span><span>  </span><span class="hs-special">)</span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-50"></span><span>
</span><span id="line-51"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Prelude.html#"><span class="hs-identifier">Prelude</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-52"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Distribution.Compat.Prelude.html"><span class="hs-identifier">Distribution.Compat.Prelude</span></a></span><span>
</span><span id="line-53"></span><span>
</span><span id="line-54"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Distribution.Types.TargetInfo.html"><span class="hs-identifier">Distribution.Types.TargetInfo</span></a></span><span>
</span><span id="line-55"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Distribution.Types.LocalBuildInfo.html"><span class="hs-identifier">Distribution.Types.LocalBuildInfo</span></a></span><span>
</span><span id="line-56"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Distribution.Types.ComponentLocalBuildInfo.html"><span class="hs-identifier">Distribution.Types.ComponentLocalBuildInfo</span></a></span><span>
</span><span id="line-57"></span><span>
</span><span id="line-58"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Distribution.Simple.LocalBuildInfo.html"><span class="hs-identifier">Distribution.Simple.LocalBuildInfo</span></a></span><span>
</span><span id="line-59"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Distribution.Simple.BuildPaths.html"><span class="hs-identifier">Distribution.Simple.BuildPaths</span></a></span><span>
</span><span id="line-60"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Distribution.Simple.BuildTarget.html"><span class="hs-identifier">Distribution.Simple.BuildTarget</span></a></span><span>
</span><span id="line-61"></span><span>
</span><span id="line-62"></span><span class="hs-keyword">import</span><span> </span><span class="hs-keyword">qualified</span><span> </span><span class="annot"><a href="Distribution.Simple.GHC.html"><span class="hs-identifier">Distribution.Simple.GHC</span></a></span><span>   </span><span class="hs-keyword">as</span><span> </span><span class="annot"><span class="hs-identifier">GHC</span></span><span>
</span><span id="line-63"></span><span class="hs-keyword">import</span><span> </span><span class="hs-keyword">qualified</span><span> </span><span class="annot"><a href="Distribution.Simple.GHCJS.html"><span class="hs-identifier">Distribution.Simple.GHCJS</span></a></span><span> </span><span class="hs-keyword">as</span><span> </span><span class="annot"><span class="hs-identifier">GHCJS</span></span><span>
</span><span id="line-64"></span><span class="hs-keyword">import</span><span> </span><span class="hs-keyword">qualified</span><span> </span><span class="annot"><a href="Distribution.Simple.UHC.html"><span class="hs-identifier">Distribution.Simple.UHC</span></a></span><span>   </span><span class="hs-keyword">as</span><span> </span><span class="annot"><span class="hs-identifier">UHC</span></span><span>
</span><span id="line-65"></span><span class="hs-keyword">import</span><span> </span><span class="hs-keyword">qualified</span><span> </span><span class="annot"><a href="Distribution.Simple.HaskellSuite.html"><span class="hs-identifier">Distribution.Simple.HaskellSuite</span></a></span><span> </span><span class="hs-keyword">as</span><span> </span><span class="annot"><span class="hs-identifier">HaskellSuite</span></span><span>
</span><span id="line-66"></span><span class="hs-keyword">import</span><span> </span><span class="hs-keyword">qualified</span><span> </span><span class="annot"><a href="Distribution.Simple.PackageIndex.html"><span class="hs-identifier">Distribution.Simple.PackageIndex</span></a></span><span> </span><span class="hs-keyword">as</span><span> </span><span class="annot"><span class="hs-identifier">Index</span></span><span>
</span><span id="line-67"></span><span>
</span><span id="line-68"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Distribution.Backpack.DescribeUnitId.html"><span class="hs-identifier">Distribution.Backpack.DescribeUnitId</span></a></span><span>
</span><span id="line-69"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Distribution.Simple.Compiler.html"><span class="hs-identifier">Distribution.Simple.Compiler</span></a></span><span>
</span><span id="line-70"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Distribution.Simple.Program.html"><span class="hs-identifier">Distribution.Simple.Program</span></a></span><span>
</span><span id="line-71"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Distribution.Simple.Program.Script.html"><span class="hs-identifier">Distribution.Simple.Program.Script</span></a></span><span>
</span><span id="line-72"></span><span class="hs-keyword">import</span><span> </span><span class="hs-keyword">qualified</span><span> </span><span class="annot"><a href="Distribution.Simple.Program.HcPkg.html"><span class="hs-identifier">Distribution.Simple.Program.HcPkg</span></a></span><span> </span><span class="hs-keyword">as</span><span> </span><span class="annot"><span class="hs-identifier">HcPkg</span></span><span>
</span><span id="line-73"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Distribution.Simple.Setup.html"><span class="hs-identifier">Distribution.Simple.Setup</span></a></span><span>
</span><span id="line-74"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Distribution.PackageDescription.html"><span class="hs-identifier">Distribution.PackageDescription</span></a></span><span>
</span><span id="line-75"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Distribution.Package.html"><span class="hs-identifier">Distribution.Package</span></a></span><span>
</span><span id="line-76"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Distribution.License.html"><span class="hs-identifier">Distribution.License</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.License.html#licenseToSPDX"><span class="hs-identifier">licenseToSPDX</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Distribution.License.html#licenseFromSPDX"><span class="hs-identifier">licenseFromSPDX</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-77"></span><span class="hs-keyword">import</span><span> </span><span class="hs-keyword">qualified</span><span> </span><span class="annot"><a href="Distribution.InstalledPackageInfo.html"><span class="hs-identifier">Distribution.InstalledPackageInfo</span></a></span><span> </span><span class="hs-keyword">as</span><span> </span><span class="annot"><span class="hs-identifier">IPI</span></span><span>
</span><span id="line-78"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Distribution.InstalledPackageInfo.html"><span class="hs-identifier">Distribution.InstalledPackageInfo</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Types.InstalledPackageInfo.html#InstalledPackageInfo"><span class="hs-identifier">InstalledPackageInfo</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-79"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Distribution.Simple.Utils.html"><span class="hs-identifier">Distribution.Simple.Utils</span></a></span><span>
</span><span id="line-80"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Distribution.Utils.MapAccum.html"><span class="hs-identifier">Distribution.Utils.MapAccum</span></a></span><span>
</span><span id="line-81"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Distribution.System.html"><span class="hs-identifier">Distribution.System</span></a></span><span>
</span><span id="line-82"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Distribution.Pretty.html"><span class="hs-identifier">Distribution.Pretty</span></a></span><span>
</span><span id="line-83"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Distribution.Verbosity.html"><span class="hs-identifier">Distribution.Verbosity</span></a></span><span> </span><span class="hs-keyword">as</span><span> </span><span class="annot"><span class="hs-identifier">Verbosity</span></span><span>
</span><span id="line-84"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Distribution.Version.html"><span class="hs-identifier">Distribution.Version</span></a></span><span>
</span><span id="line-85"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Distribution.Compat.Graph.html"><span class="hs-identifier">Distribution.Compat.Graph</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Compat.Graph.html#IsNode"><span class="hs-identifier">IsNode</span></a></span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Compat.Graph.html#nodeKey"><span class="hs-identifier">nodeKey</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-86"></span><span>
</span><span id="line-87"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../filepath/src/System.FilePath.html#"><span class="hs-identifier">System.FilePath</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../filepath/src/System.FilePath.Windows.html#%3C%2F%3E"><span class="hs-operator">(&lt;/&gt;)</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../filepath/src/System.FilePath.Windows.html#%3C.%3E"><span class="hs-operator">(&lt;.&gt;)</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../filepath/src/System.FilePath.Windows.html#isAbsolute"><span class="hs-identifier">isAbsolute</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-88"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../directory/src/System.Directory.html#"><span class="hs-identifier">System.Directory</span></a></span><span>
</span><span id="line-89"></span><span>
</span><span id="line-90"></span><span class="hs-keyword">import</span><span> </span><span class="hs-keyword">qualified</span><span> </span><span class="annot"><a href="../../bytestring/src/Data.ByteString.Lazy.Char8.html#"><span class="hs-identifier">Data.ByteString.Lazy.Char8</span></a></span><span> </span><span class="hs-keyword">as</span><span> </span><span class="annot"><span class="hs-identifier">BS.Char8</span></span><span>
</span><span id="line-91"></span><span>
</span><span id="line-92"></span><span class="hs-comment">-- -----------------------------------------------------------------------------</span><span>
</span><span id="line-93"></span><span class="hs-comment">-- Registration</span><span>
</span><span id="line-94"></span><span>
</span><span id="line-95"></span><span class="annot"><a href="Distribution.Simple.Register.html#register"><span class="hs-identifier hs-type">register</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Types.PackageDescription.html#PackageDescription"><span class="hs-identifier hs-type">PackageDescription</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.LocalBuildInfo.html#LocalBuildInfo"><span class="hs-identifier hs-type">LocalBuildInfo</span></a></span><span>
</span><span id="line-96"></span><span>         </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.Setup.html#RegisterFlags"><span class="hs-identifier hs-type">RegisterFlags</span></a></span><span> </span><span class="hs-comment">-- ^Install in the user's database?; verbose</span><span>
</span><span id="line-97"></span><span>         </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-98"></span><span id="register"><span class="annot"><span class="annottext">register :: PackageDescription -&gt; LocalBuildInfo -&gt; RegisterFlags -&gt; IO ()
</span><a href="Distribution.Simple.Register.html#register"><span class="hs-identifier hs-var hs-var">register</span></a></span></span><span> </span><span id="local-6989586621679725253"><span class="annot"><span class="annottext">PackageDescription
</span><a href="#local-6989586621679725253"><span class="hs-identifier hs-var">pkg_descr</span></a></span></span><span> </span><span id="local-6989586621679725252"><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679725252"><span class="hs-identifier hs-var">lbi0</span></a></span></span><span> </span><span id="local-6989586621679725251"><span class="annot"><span class="annottext">RegisterFlags
</span><a href="#local-6989586621679725251"><span class="hs-identifier hs-var">flags</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-99"></span><span>   </span><span class="hs-comment">-- Duncan originally asked for us to not register/install files</span><span>
</span><span id="line-100"></span><span>   </span><span class="hs-comment">-- when there was no public library.  But with per-component</span><span>
</span><span id="line-101"></span><span>   </span><span class="hs-comment">-- configure, we legitimately need to install internal libraries</span><span>
</span><span id="line-102"></span><span>   </span><span class="hs-comment">-- so that we can get them.  So just unconditionally install.</span><span>
</span><span id="line-103"></span><span>   </span><span class="annot"><span class="annottext">IO ()
</span><a href="#local-6989586621679725250"><span class="hs-identifier hs-var">doRegister</span></a></span><span>
</span><span id="line-104"></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-105"></span><span>  </span><span id="local-6989586621679725250"><span class="annot"><span class="annottext">doRegister :: IO ()
</span><a href="#local-6989586621679725250"><span class="hs-identifier hs-var hs-var">doRegister</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-106"></span><span>    </span><span id="local-6989586621679725241"><span class="annot"><span class="annottext">[TargetInfo]
</span><a href="#local-6989586621679725241"><span class="hs-identifier hs-var">targets</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Verbosity
-&gt; PackageDescription
-&gt; LocalBuildInfo
-&gt; [String]
-&gt; IO [TargetInfo]
</span><a href="Distribution.Simple.BuildTarget.html#readTargetInfos"><span class="hs-identifier hs-var">readTargetInfos</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679725239"><span class="hs-identifier hs-var">verbosity</span></a></span><span> </span><span class="annot"><span class="annottext">PackageDescription
</span><a href="#local-6989586621679725253"><span class="hs-identifier hs-var">pkg_descr</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679725252"><span class="hs-identifier hs-var">lbi0</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">RegisterFlags -&gt; [String]
</span><a href="Distribution.Simple.Setup.html#regArgs"><span class="hs-identifier hs-var hs-var">regArgs</span></a></span><span> </span><span class="annot"><span class="annottext">RegisterFlags
</span><a href="#local-6989586621679725251"><span class="hs-identifier hs-var">flags</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-107"></span><span>
</span><span id="line-108"></span><span>    </span><span class="hs-comment">-- It's important to register in build order, because ghc-pkg</span><span>
</span><span id="line-109"></span><span>    </span><span class="hs-comment">-- will complain if a dependency is not registered.</span><span>
</span><span id="line-110"></span><span>    </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621679725235"><span class="annot"><span class="annottext">componentsToRegister :: [TargetInfo]
</span><a href="#local-6989586621679725235"><span class="hs-identifier hs-var hs-var">componentsToRegister</span></a></span></span><span>
</span><span id="line-111"></span><span>            </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">PackageDescription -&gt; LocalBuildInfo -&gt; [UnitId] -&gt; [TargetInfo]
</span><a href="Distribution.Types.LocalBuildInfo.html#neededTargetsInBuildOrder%27"><span class="hs-identifier hs-var">neededTargetsInBuildOrder'</span></a></span><span> </span><span class="annot"><span class="annottext">PackageDescription
</span><a href="#local-6989586621679725253"><span class="hs-identifier hs-var">pkg_descr</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679725252"><span class="hs-identifier hs-var">lbi0</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(TargetInfo -&gt; UnitId) -&gt; [TargetInfo] -&gt; [UnitId]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">TargetInfo -&gt; UnitId
forall a. IsNode a =&gt; a -&gt; Key a
</span><a href="Distribution.Compat.Graph.html#nodeKey"><span class="hs-identifier hs-var">nodeKey</span></a></span><span> </span><span class="annot"><span class="annottext">[TargetInfo]
</span><a href="#local-6989586621679725241"><span class="hs-identifier hs-var">targets</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-112"></span><span>
</span><span id="line-113"></span><span>    </span><span class="hs-special">(</span><span class="annot"><span class="annottext">InstalledPackageIndex
</span><span class="hs-identifier">_</span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679725233"><span class="annot"><span class="annottext">[Maybe InstalledPackageInfo]
</span><a href="#local-6989586621679725233"><span class="hs-identifier hs-var">ipi_mbs</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span>
</span><span id="line-114"></span><span>        </span><span class="annot"><span class="annottext">(InstalledPackageIndex
 -&gt; TargetInfo
 -&gt; IO (InstalledPackageIndex, Maybe InstalledPackageInfo))
-&gt; InstalledPackageIndex
-&gt; [TargetInfo]
-&gt; IO (InstalledPackageIndex, [Maybe InstalledPackageInfo])
forall (m :: * -&gt; *) (t :: * -&gt; *) a b c.
(Monad m, Traversable t) =&gt;
(a -&gt; b -&gt; m (a, c)) -&gt; a -&gt; t b -&gt; m (a, t c)
</span><a href="Distribution.Utils.MapAccum.html#mapAccumM"><span class="hs-identifier hs-var">mapAccumM</span></a></span><span> </span><span class="annot"><span class="annottext">((InstalledPackageIndex
  -&gt; TargetInfo
  -&gt; IO (InstalledPackageIndex, Maybe InstalledPackageInfo))
 -&gt; InstalledPackageIndex
 -&gt; [TargetInfo]
 -&gt; IO (InstalledPackageIndex, [Maybe InstalledPackageInfo]))
-&gt; InstalledPackageIndex
-&gt; (InstalledPackageIndex
    -&gt; TargetInfo
    -&gt; IO (InstalledPackageIndex, Maybe InstalledPackageInfo))
-&gt; [TargetInfo]
-&gt; IO (InstalledPackageIndex, [Maybe InstalledPackageInfo])
forall a b c. (a -&gt; b -&gt; c) -&gt; b -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#flip"><span class="hs-operator hs-var">`flip`</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo -&gt; InstalledPackageIndex
</span><a href="Distribution.Types.LocalBuildInfo.html#installedPkgs"><span class="hs-identifier hs-var hs-var">installedPkgs</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679725252"><span class="hs-identifier hs-var">lbi0</span></a></span><span> </span><span class="annot"><span class="annottext">((InstalledPackageIndex
  -&gt; TargetInfo
  -&gt; IO (InstalledPackageIndex, Maybe InstalledPackageInfo))
 -&gt; [TargetInfo]
 -&gt; IO (InstalledPackageIndex, [Maybe InstalledPackageInfo]))
-&gt; [TargetInfo]
-&gt; (InstalledPackageIndex
    -&gt; TargetInfo
    -&gt; IO (InstalledPackageIndex, Maybe InstalledPackageInfo))
-&gt; IO (InstalledPackageIndex, [Maybe InstalledPackageInfo])
forall a b c. (a -&gt; b -&gt; c) -&gt; b -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#flip"><span class="hs-operator hs-var">`flip`</span></a></span><span> </span><span class="annot"><span class="annottext">[TargetInfo]
</span><a href="#local-6989586621679725235"><span class="hs-identifier hs-var">componentsToRegister</span></a></span><span> </span><span class="annot"><span class="annottext">((InstalledPackageIndex
  -&gt; TargetInfo
  -&gt; IO (InstalledPackageIndex, Maybe InstalledPackageInfo))
 -&gt; IO (InstalledPackageIndex, [Maybe InstalledPackageInfo]))
-&gt; (InstalledPackageIndex
    -&gt; TargetInfo
    -&gt; IO (InstalledPackageIndex, Maybe InstalledPackageInfo))
-&gt; IO (InstalledPackageIndex, [Maybe InstalledPackageInfo])
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-glyph">\</span><span id="local-6989586621679725229"><span class="annot"><span class="annottext">InstalledPackageIndex
</span><a href="#local-6989586621679725229"><span class="hs-identifier hs-var">index</span></a></span></span><span> </span><span id="local-6989586621679725228"><span class="annot"><span class="annottext">TargetInfo
</span><a href="#local-6989586621679725228"><span class="hs-identifier hs-var">tgt</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-115"></span><span>            </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">TargetInfo -&gt; Component
</span><a href="Distribution.Types.TargetInfo.html#targetComponent"><span class="hs-identifier hs-var hs-var">targetComponent</span></a></span><span> </span><span class="annot"><span class="annottext">TargetInfo
</span><a href="#local-6989586621679725228"><span class="hs-identifier hs-var">tgt</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-116"></span><span>                </span><span class="annot"><a href="Distribution.Types.Component.html#CLib"><span class="hs-identifier hs-type">CLib</span></a></span><span> </span><span id="local-6989586621679725225"><span class="annot"><span class="annottext">Library
</span><a href="#local-6989586621679725225"><span class="hs-identifier hs-var">lib</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-117"></span><span>                    </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621679725224"><span class="annot"><span class="annottext">clbi :: ComponentLocalBuildInfo
</span><a href="#local-6989586621679725224"><span class="hs-identifier hs-var hs-var">clbi</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">TargetInfo -&gt; ComponentLocalBuildInfo
</span><a href="Distribution.Types.TargetInfo.html#targetCLBI"><span class="hs-identifier hs-var hs-var">targetCLBI</span></a></span><span> </span><span class="annot"><span class="annottext">TargetInfo
</span><a href="#local-6989586621679725228"><span class="hs-identifier hs-var">tgt</span></a></span><span>
</span><span id="line-118"></span><span>                        </span><span id="local-6989586621679725222"><span class="annot"><span class="annottext">lbi :: LocalBuildInfo
</span><a href="#local-6989586621679725222"><span class="hs-identifier hs-var hs-var">lbi</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679725252"><span class="hs-identifier hs-var">lbi0</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">installedPkgs :: InstalledPackageIndex
</span><a href="Distribution.Types.LocalBuildInfo.html#installedPkgs"><span class="hs-identifier hs-var">installedPkgs</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">InstalledPackageIndex
</span><a href="#local-6989586621679725229"><span class="hs-identifier hs-var">index</span></a></span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-119"></span><span>                    </span><span id="local-6989586621679725221"><span class="annot"><span class="annottext">InstalledPackageInfo
</span><a href="#local-6989586621679725221"><span class="hs-identifier hs-var">ipi</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">PackageDescription
-&gt; Library
-&gt; LocalBuildInfo
-&gt; ComponentLocalBuildInfo
-&gt; RegisterFlags
-&gt; IO InstalledPackageInfo
</span><a href="Distribution.Simple.Register.html#generateOne"><span class="hs-identifier hs-var">generateOne</span></a></span><span> </span><span class="annot"><span class="annottext">PackageDescription
</span><a href="#local-6989586621679725253"><span class="hs-identifier hs-var">pkg_descr</span></a></span><span> </span><span class="annot"><span class="annottext">Library
</span><a href="#local-6989586621679725225"><span class="hs-identifier hs-var">lib</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679725222"><span class="hs-identifier hs-var">lbi</span></a></span><span> </span><span class="annot"><span class="annottext">ComponentLocalBuildInfo
</span><a href="#local-6989586621679725224"><span class="hs-identifier hs-var">clbi</span></a></span><span> </span><span class="annot"><span class="annottext">RegisterFlags
</span><a href="#local-6989586621679725251"><span class="hs-identifier hs-var">flags</span></a></span><span>
</span><span id="line-120"></span><span>                    </span><span class="annot"><span class="annottext">(InstalledPackageIndex, Maybe InstalledPackageInfo)
-&gt; IO (InstalledPackageIndex, Maybe InstalledPackageInfo)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">InstalledPackageInfo
-&gt; InstalledPackageIndex -&gt; InstalledPackageIndex
</span><a href="Distribution.Simple.PackageIndex.html#insert"><span class="hs-identifier hs-var">Index.insert</span></a></span><span> </span><span class="annot"><span class="annottext">InstalledPackageInfo
</span><a href="#local-6989586621679725221"><span class="hs-identifier hs-var">ipi</span></a></span><span> </span><span class="annot"><span class="annottext">InstalledPackageIndex
</span><a href="#local-6989586621679725229"><span class="hs-identifier hs-var">index</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">InstalledPackageInfo -&gt; Maybe InstalledPackageInfo
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">InstalledPackageInfo
</span><a href="#local-6989586621679725221"><span class="hs-identifier hs-var">ipi</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-121"></span><span>                </span><span class="annot"><span class="annottext">Component
</span><span class="hs-identifier">_</span></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">(InstalledPackageIndex, Maybe InstalledPackageInfo)
-&gt; IO (InstalledPackageIndex, Maybe InstalledPackageInfo)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">InstalledPackageIndex
</span><a href="#local-6989586621679725229"><span class="hs-identifier hs-var">index</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Maybe InstalledPackageInfo
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-122"></span><span>
</span><span id="line-123"></span><span>    </span><span class="annot"><span class="annottext">PackageDescription
-&gt; LocalBuildInfo
-&gt; RegisterFlags
-&gt; [InstalledPackageInfo]
-&gt; IO ()
</span><a href="Distribution.Simple.Register.html#registerAll"><span class="hs-identifier hs-var">registerAll</span></a></span><span> </span><span class="annot"><span class="annottext">PackageDescription
</span><a href="#local-6989586621679725253"><span class="hs-identifier hs-var">pkg_descr</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679725252"><span class="hs-identifier hs-var">lbi0</span></a></span><span> </span><span class="annot"><span class="annottext">RegisterFlags
</span><a href="#local-6989586621679725251"><span class="hs-identifier hs-var">flags</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[Maybe InstalledPackageInfo] -&gt; [InstalledPackageInfo]
forall a. [Maybe a] -&gt; [a]
</span><a href="../../base/src/Data.Maybe.html#catMaybes"><span class="hs-identifier hs-var">catMaybes</span></a></span><span> </span><span class="annot"><span class="annottext">[Maybe InstalledPackageInfo]
</span><a href="#local-6989586621679725233"><span class="hs-identifier hs-var">ipi_mbs</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-124"></span><span>   </span><span class="hs-keyword">where</span><span>
</span><span id="line-125"></span><span>    </span><span id="local-6989586621679725239"><span class="annot"><span class="annottext">verbosity :: Verbosity
</span><a href="#local-6989586621679725239"><span class="hs-identifier hs-var hs-var">verbosity</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Flag Verbosity -&gt; Verbosity
forall a. WithCallStack (Flag a -&gt; a)
</span><a href="Distribution.Simple.Flag.html#fromFlag"><span class="hs-identifier hs-var">fromFlag</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">RegisterFlags -&gt; Flag Verbosity
</span><a href="Distribution.Simple.Setup.html#regVerbosity"><span class="hs-identifier hs-var hs-var">regVerbosity</span></a></span><span> </span><span class="annot"><span class="annottext">RegisterFlags
</span><a href="#local-6989586621679725251"><span class="hs-identifier hs-var">flags</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-126"></span><span>
</span><span id="line-127"></span><span class="annot"><a href="Distribution.Simple.Register.html#generateOne"><span class="hs-identifier hs-type">generateOne</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Types.PackageDescription.html#PackageDescription"><span class="hs-identifier hs-type">PackageDescription</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.Library.html#Library"><span class="hs-identifier hs-type">Library</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.LocalBuildInfo.html#LocalBuildInfo"><span class="hs-identifier hs-type">LocalBuildInfo</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.ComponentLocalBuildInfo.html#ComponentLocalBuildInfo"><span class="hs-identifier hs-type">ComponentLocalBuildInfo</span></a></span><span>
</span><span id="line-128"></span><span>            </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.Setup.html#RegisterFlags"><span class="hs-identifier hs-type">RegisterFlags</span></a></span><span>
</span><span id="line-129"></span><span>            </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="annot"><a href="Distribution.Types.InstalledPackageInfo.html#InstalledPackageInfo"><span class="hs-identifier hs-type">InstalledPackageInfo</span></a></span><span>
</span><span id="line-130"></span><span id="generateOne"><span class="annot"><span class="annottext">generateOne :: PackageDescription
-&gt; Library
-&gt; LocalBuildInfo
-&gt; ComponentLocalBuildInfo
-&gt; RegisterFlags
-&gt; IO InstalledPackageInfo
</span><a href="Distribution.Simple.Register.html#generateOne"><span class="hs-identifier hs-var hs-var">generateOne</span></a></span></span><span> </span><span id="local-6989586621679725212"><span class="annot"><span class="annottext">PackageDescription
</span><a href="#local-6989586621679725212"><span class="hs-identifier hs-var">pkg</span></a></span></span><span> </span><span id="local-6989586621679725211"><span class="annot"><span class="annottext">Library
</span><a href="#local-6989586621679725211"><span class="hs-identifier hs-var">lib</span></a></span></span><span> </span><span id="local-6989586621679725210"><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679725210"><span class="hs-identifier hs-var">lbi</span></a></span></span><span> </span><span id="local-6989586621679725209"><span class="annot"><span class="annottext">ComponentLocalBuildInfo
</span><a href="#local-6989586621679725209"><span class="hs-identifier hs-var">clbi</span></a></span></span><span> </span><span id="local-6989586621679725208"><span class="annot"><span class="annottext">RegisterFlags
</span><a href="#local-6989586621679725208"><span class="hs-identifier hs-var">regFlags</span></a></span></span><span>
</span><span id="line-131"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-132"></span><span>    </span><span id="local-6989586621679725207"><span class="annot"><span class="annottext">PackageDBStack
</span><a href="#local-6989586621679725207"><span class="hs-identifier hs-var">absPackageDBs</span></a></span></span><span>    </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">PackageDBStack -&gt; IO PackageDBStack
</span><a href="Distribution.Simple.Compiler.html#absolutePackageDBPaths"><span class="hs-identifier hs-var">absolutePackageDBPaths</span></a></span><span> </span><span class="annot"><span class="annottext">PackageDBStack
</span><a href="#local-6989586621679725205"><span class="hs-identifier hs-var">packageDbs</span></a></span><span>
</span><span id="line-133"></span><span>    </span><span id="local-6989586621679725204"><span class="annot"><span class="annottext">InstalledPackageInfo
</span><a href="#local-6989586621679725204"><span class="hs-identifier hs-var">installedPkgInfo</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Verbosity
-&gt; PackageDescription
-&gt; Library
-&gt; LocalBuildInfo
-&gt; ComponentLocalBuildInfo
-&gt; Bool
-&gt; Bool
-&gt; String
-&gt; PackageDB
-&gt; IO InstalledPackageInfo
</span><a href="Distribution.Simple.Register.html#generateRegistrationInfo"><span class="hs-identifier hs-var">generateRegistrationInfo</span></a></span><span>
</span><span id="line-134"></span><span>                           </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679725203"><span class="hs-identifier hs-var">verbosity</span></a></span><span> </span><span class="annot"><span class="annottext">PackageDescription
</span><a href="#local-6989586621679725212"><span class="hs-identifier hs-var">pkg</span></a></span><span> </span><span class="annot"><span class="annottext">Library
</span><a href="#local-6989586621679725211"><span class="hs-identifier hs-var">lib</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679725210"><span class="hs-identifier hs-var">lbi</span></a></span><span> </span><span class="annot"><span class="annottext">ComponentLocalBuildInfo
</span><a href="#local-6989586621679725209"><span class="hs-identifier hs-var">clbi</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679725202"><span class="hs-identifier hs-var">inplace</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679725201"><span class="hs-identifier hs-var">reloc</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725200"><span class="hs-identifier hs-var">distPref</span></a></span><span>
</span><span id="line-135"></span><span>                           </span><span class="hs-special">(</span><span class="annot"><span class="annottext">PackageDBStack -&gt; PackageDB
</span><a href="Distribution.Simple.Compiler.html#registrationPackageDB"><span class="hs-identifier hs-var">registrationPackageDB</span></a></span><span> </span><span class="annot"><span class="annottext">PackageDBStack
</span><a href="#local-6989586621679725207"><span class="hs-identifier hs-var">absPackageDBs</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-136"></span><span>    </span><span class="annot"><span class="annottext">Verbosity -&gt; String -&gt; IO ()
</span><a href="Distribution.Simple.Utils.html#info"><span class="hs-identifier hs-var">info</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679725203"><span class="hs-identifier hs-var">verbosity</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">InstalledPackageInfo -&gt; String
</span><a href="Distribution.InstalledPackageInfo.html#showInstalledPackageInfo"><span class="hs-identifier hs-var">IPI.showInstalledPackageInfo</span></a></span><span> </span><span class="annot"><span class="annottext">InstalledPackageInfo
</span><a href="#local-6989586621679725204"><span class="hs-identifier hs-var">installedPkgInfo</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-137"></span><span>    </span><span class="annot"><span class="annottext">InstalledPackageInfo -&gt; IO InstalledPackageInfo
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">InstalledPackageInfo
</span><a href="#local-6989586621679725204"><span class="hs-identifier hs-var">installedPkgInfo</span></a></span><span>
</span><span id="line-138"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-139"></span><span>    </span><span id="local-6989586621679725202"><span class="annot"><span class="annottext">inplace :: Bool
</span><a href="#local-6989586621679725202"><span class="hs-identifier hs-var hs-var">inplace</span></a></span></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Flag Bool -&gt; Bool
forall a. WithCallStack (Flag a -&gt; a)
</span><a href="Distribution.Simple.Flag.html#fromFlag"><span class="hs-identifier hs-var">fromFlag</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">RegisterFlags -&gt; Flag Bool
</span><a href="Distribution.Simple.Setup.html#regInPlace"><span class="hs-identifier hs-var hs-var">regInPlace</span></a></span><span> </span><span class="annot"><span class="annottext">RegisterFlags
</span><a href="#local-6989586621679725208"><span class="hs-identifier hs-var">regFlags</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-140"></span><span>    </span><span id="local-6989586621679725201"><span class="annot"><span class="annottext">reloc :: Bool
</span><a href="#local-6989586621679725201"><span class="hs-identifier hs-var hs-var">reloc</span></a></span></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo -&gt; Bool
</span><a href="Distribution.Types.LocalBuildInfo.html#relocatable"><span class="hs-identifier hs-var hs-var">relocatable</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679725210"><span class="hs-identifier hs-var">lbi</span></a></span><span>
</span><span id="line-141"></span><span>    </span><span class="hs-comment">-- FIXME: there's really no guarantee this will work.</span><span>
</span><span id="line-142"></span><span>    </span><span class="hs-comment">-- registering into a totally different db stack can</span><span>
</span><span id="line-143"></span><span>    </span><span class="hs-comment">-- fail if dependencies cannot be satisfied.</span><span>
</span><span id="line-144"></span><span>    </span><span id="local-6989586621679725205"><span class="annot"><span class="annottext">packageDbs :: PackageDBStack
</span><a href="#local-6989586621679725205"><span class="hs-identifier hs-var hs-var">packageDbs</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">PackageDBStack -&gt; PackageDBStack
forall a. Eq a =&gt; [a] -&gt; [a]
</span><a href="../../base/src/Data.OldList.html#nub"><span class="hs-identifier hs-var">nub</span></a></span><span> </span><span class="annot"><span class="annottext">(PackageDBStack -&gt; PackageDBStack)
-&gt; PackageDBStack -&gt; PackageDBStack
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo -&gt; PackageDBStack
</span><a href="Distribution.Types.LocalBuildInfo.html#withPackageDB"><span class="hs-identifier hs-var hs-var">withPackageDB</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679725210"><span class="hs-identifier hs-var">lbi</span></a></span><span>
</span><span id="line-145"></span><span>                    </span><span class="annot"><span class="annottext">PackageDBStack -&gt; PackageDBStack -&gt; PackageDBStack
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe PackageDB -&gt; PackageDBStack
forall a. Maybe a -&gt; [a]
</span><a href="../../base/src/Data.Maybe.html#maybeToList"><span class="hs-identifier hs-var">maybeToList</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Flag PackageDB -&gt; Maybe PackageDB
forall a. Flag a -&gt; Maybe a
</span><a href="Distribution.Simple.Flag.html#flagToMaybe"><span class="hs-identifier hs-var">flagToMaybe</span></a></span><span>  </span><span class="hs-special">(</span><span class="annot"><span class="annottext">RegisterFlags -&gt; Flag PackageDB
</span><a href="Distribution.Simple.Setup.html#regPackageDB"><span class="hs-identifier hs-var hs-var">regPackageDB</span></a></span><span> </span><span class="annot"><span class="annottext">RegisterFlags
</span><a href="#local-6989586621679725208"><span class="hs-identifier hs-var">regFlags</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-146"></span><span>    </span><span id="local-6989586621679725200"><span class="annot"><span class="annottext">distPref :: String
</span><a href="#local-6989586621679725200"><span class="hs-identifier hs-var hs-var">distPref</span></a></span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Flag String -&gt; String
forall a. WithCallStack (Flag a -&gt; a)
</span><a href="Distribution.Simple.Flag.html#fromFlag"><span class="hs-identifier hs-var">fromFlag</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">RegisterFlags -&gt; Flag String
</span><a href="Distribution.Simple.Setup.html#regDistPref"><span class="hs-identifier hs-var hs-var">regDistPref</span></a></span><span> </span><span class="annot"><span class="annottext">RegisterFlags
</span><a href="#local-6989586621679725208"><span class="hs-identifier hs-var">regFlags</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-147"></span><span>    </span><span id="local-6989586621679725203"><span class="annot"><span class="annottext">verbosity :: Verbosity
</span><a href="#local-6989586621679725203"><span class="hs-identifier hs-var hs-var">verbosity</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Flag Verbosity -&gt; Verbosity
forall a. WithCallStack (Flag a -&gt; a)
</span><a href="Distribution.Simple.Flag.html#fromFlag"><span class="hs-identifier hs-var">fromFlag</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">RegisterFlags -&gt; Flag Verbosity
</span><a href="Distribution.Simple.Setup.html#regVerbosity"><span class="hs-identifier hs-var hs-var">regVerbosity</span></a></span><span> </span><span class="annot"><span class="annottext">RegisterFlags
</span><a href="#local-6989586621679725208"><span class="hs-identifier hs-var">regFlags</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-148"></span><span>
</span><span id="line-149"></span><span class="annot"><a href="Distribution.Simple.Register.html#registerAll"><span class="hs-identifier hs-type">registerAll</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Types.PackageDescription.html#PackageDescription"><span class="hs-identifier hs-type">PackageDescription</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.LocalBuildInfo.html#LocalBuildInfo"><span class="hs-identifier hs-type">LocalBuildInfo</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.Setup.html#RegisterFlags"><span class="hs-identifier hs-type">RegisterFlags</span></a></span><span>
</span><span id="line-150"></span><span>            </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="Distribution.Types.InstalledPackageInfo.html#InstalledPackageInfo"><span class="hs-identifier hs-type">InstalledPackageInfo</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-151"></span><span>            </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-152"></span><span id="registerAll"><span class="annot"><span class="annottext">registerAll :: PackageDescription
-&gt; LocalBuildInfo
-&gt; RegisterFlags
-&gt; [InstalledPackageInfo]
-&gt; IO ()
</span><a href="Distribution.Simple.Register.html#registerAll"><span class="hs-identifier hs-var hs-var">registerAll</span></a></span></span><span> </span><span id="local-6989586621679725180"><span class="annot"><span class="annottext">PackageDescription
</span><a href="#local-6989586621679725180"><span class="hs-identifier hs-var">pkg</span></a></span></span><span> </span><span id="local-6989586621679725179"><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679725179"><span class="hs-identifier hs-var">lbi</span></a></span></span><span> </span><span id="local-6989586621679725178"><span class="annot"><span class="annottext">RegisterFlags
</span><a href="#local-6989586621679725178"><span class="hs-identifier hs-var">regFlags</span></a></span></span><span> </span><span id="local-6989586621679725177"><span class="annot"><span class="annottext">[InstalledPackageInfo]
</span><a href="#local-6989586621679725177"><span class="hs-identifier hs-var">ipis</span></a></span></span><span>
</span><span id="line-153"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-154"></span><span>    </span><span class="annot"><span class="annottext">Bool -&gt; IO () -&gt; IO ()
forall (f :: * -&gt; *). Applicative f =&gt; Bool -&gt; f () -&gt; f ()
</span><a href="../../base/src/GHC.Base.html#when"><span class="hs-identifier hs-var">when</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Flag Bool -&gt; Bool
forall a. WithCallStack (Flag a -&gt; a)
</span><a href="Distribution.Simple.Flag.html#fromFlag"><span class="hs-identifier hs-var">fromFlag</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">RegisterFlags -&gt; Flag Bool
</span><a href="Distribution.Simple.Setup.html#regPrintId"><span class="hs-identifier hs-var hs-var">regPrintId</span></a></span><span> </span><span class="annot"><span class="annottext">RegisterFlags
</span><a href="#local-6989586621679725178"><span class="hs-identifier hs-var">regFlags</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">(IO () -&gt; IO ()) -&gt; IO () -&gt; IO ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-155"></span><span>      </span><span class="annot"><span class="annottext">[InstalledPackageInfo] -&gt; (InstalledPackageInfo -&gt; IO ()) -&gt; IO ()
forall (t :: * -&gt; *) (f :: * -&gt; *) a b.
(Foldable t, Applicative f) =&gt;
t a -&gt; (a -&gt; f b) -&gt; f ()
</span><a href="../../base/src/Data.Foldable.html#for_"><span class="hs-identifier hs-var">for_</span></a></span><span> </span><span class="annot"><span class="annottext">[InstalledPackageInfo]
</span><a href="#local-6989586621679725177"><span class="hs-identifier hs-var">ipis</span></a></span><span> </span><span class="annot"><span class="annottext">((InstalledPackageInfo -&gt; IO ()) -&gt; IO ())
-&gt; (InstalledPackageInfo -&gt; IO ()) -&gt; IO ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-glyph">\</span><span id="local-6989586621679725173"><span class="annot"><span class="annottext">InstalledPackageInfo
</span><a href="#local-6989586621679725173"><span class="hs-identifier hs-var">installedPkgInfo</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-156"></span><span>        </span><span class="hs-comment">-- Only print the public library's IPI</span><span>
</span><span id="line-157"></span><span>        </span><span class="annot"><span class="annottext">Bool -&gt; IO () -&gt; IO ()
forall (f :: * -&gt; *). Applicative f =&gt; Bool -&gt; f () -&gt; f ()
</span><a href="../../base/src/GHC.Base.html#when"><span class="hs-identifier hs-var">when</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">InstalledPackageInfo -&gt; PackageIdentifier
forall pkg. Package pkg =&gt; pkg -&gt; PackageIdentifier
</span><a href="Distribution.Package.html#packageId"><span class="hs-identifier hs-var">packageId</span></a></span><span> </span><span class="annot"><span class="annottext">InstalledPackageInfo
</span><a href="#local-6989586621679725173"><span class="hs-identifier hs-var">installedPkgInfo</span></a></span><span> </span><span class="annot"><span class="annottext">PackageIdentifier -&gt; PackageIdentifier -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">==</span></span><span> </span><span class="annot"><span class="annottext">PackageDescription -&gt; PackageIdentifier
forall pkg. Package pkg =&gt; pkg -&gt; PackageIdentifier
</span><a href="Distribution.Package.html#packageId"><span class="hs-identifier hs-var">packageId</span></a></span><span> </span><span class="annot"><span class="annottext">PackageDescription
</span><a href="#local-6989586621679725180"><span class="hs-identifier hs-var">pkg</span></a></span><span>
</span><span id="line-158"></span><span>              </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">&amp;&amp;</span></span><span> </span><span class="annot"><span class="annottext">InstalledPackageInfo -&gt; LibraryName
</span><a href="Distribution.Types.InstalledPackageInfo.html#sourceLibName"><span class="hs-identifier hs-var hs-var">IPI.sourceLibName</span></a></span><span> </span><span class="annot"><span class="annottext">InstalledPackageInfo
</span><a href="#local-6989586621679725173"><span class="hs-identifier hs-var">installedPkgInfo</span></a></span><span> </span><span class="annot"><span class="annottext">LibraryName -&gt; LibraryName -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">==</span></span><span> </span><span class="annot"><span class="annottext">LibraryName
</span><a href="Distribution.Types.LibraryName.html#LMainLibName"><span class="hs-identifier hs-var">LMainLibName</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">(IO () -&gt; IO ()) -&gt; IO () -&gt; IO ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-159"></span><span>          </span><span class="annot"><span class="annottext">String -&gt; IO ()
</span><a href="../../base/src/System.IO.html#putStrLn"><span class="hs-identifier hs-var">putStrLn</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">UnitId -&gt; String
forall a. Pretty a =&gt; a -&gt; String
</span><a href="Distribution.Pretty.html#prettyShow"><span class="hs-identifier hs-var">prettyShow</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">InstalledPackageInfo -&gt; UnitId
</span><a href="Distribution.Types.InstalledPackageInfo.html#installedUnitId"><span class="hs-identifier hs-var hs-var">IPI.installedUnitId</span></a></span><span> </span><span class="annot"><span class="annottext">InstalledPackageInfo
</span><a href="#local-6989586621679725173"><span class="hs-identifier hs-var">installedPkgInfo</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-160"></span><span>
</span><span id="line-161"></span><span>     </span><span class="hs-comment">-- Three different modes:</span><span>
</span><span id="line-162"></span><span>    </span><span class="hs-keyword">case</span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-163"></span><span>     </span><span class="annot"><span class="annottext">()
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679725165"><span class="hs-identifier hs-var">modeGenerateRegFile</span></a></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">IO ()
</span><a href="#local-6989586621679725164"><span class="hs-identifier hs-var">writeRegistrationFileOrDirectory</span></a></span><span>
</span><span id="line-164"></span><span>       </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679725163"><span class="hs-identifier hs-var">modeGenerateRegScript</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">IO ()
</span><a href="#local-6989586621679725162"><span class="hs-identifier hs-var">writeRegisterScript</span></a></span><span>
</span><span id="line-165"></span><span>       </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>             </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-166"></span><span>           </span><span class="annot"><span class="annottext">[InstalledPackageInfo] -&gt; (InstalledPackageInfo -&gt; IO ()) -&gt; IO ()
forall (t :: * -&gt; *) (f :: * -&gt; *) a b.
(Foldable t, Applicative f) =&gt;
t a -&gt; (a -&gt; f b) -&gt; f ()
</span><a href="../../base/src/Data.Foldable.html#for_"><span class="hs-identifier hs-var">for_</span></a></span><span> </span><span class="annot"><span class="annottext">[InstalledPackageInfo]
</span><a href="#local-6989586621679725177"><span class="hs-identifier hs-var">ipis</span></a></span><span> </span><span class="annot"><span class="annottext">((InstalledPackageInfo -&gt; IO ()) -&gt; IO ())
-&gt; (InstalledPackageInfo -&gt; IO ()) -&gt; IO ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-glyph">\</span><span id="local-6989586621679725161"><span class="annot"><span class="annottext">InstalledPackageInfo
</span><a href="#local-6989586621679725161"><span class="hs-identifier hs-var">ipi</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-167"></span><span>               </span><span class="annot"><span class="annottext">Verbosity
-&gt; String
-&gt; PackageIdentifier
-&gt; ComponentName
-&gt; Maybe [(ModuleName, OpenModule)]
-&gt; IO ()
forall a.
Pretty a =&gt;
Verbosity
-&gt; String
-&gt; PackageIdentifier
-&gt; ComponentName
-&gt; Maybe [(ModuleName, a)]
-&gt; IO ()
</span><a href="Distribution.Backpack.DescribeUnitId.html#setupMessage%27"><span class="hs-identifier hs-var">setupMessage'</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679725159"><span class="hs-identifier hs-var">verbosity</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Registering&quot;</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">PackageDescription -&gt; PackageIdentifier
forall pkg. Package pkg =&gt; pkg -&gt; PackageIdentifier
</span><a href="Distribution.Package.html#packageId"><span class="hs-identifier hs-var">packageId</span></a></span><span> </span><span class="annot"><span class="annottext">PackageDescription
</span><a href="#local-6989586621679725180"><span class="hs-identifier hs-var">pkg</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-168"></span><span>                 </span><span class="hs-special">(</span><span class="annot"><span class="annottext">LibraryName -&gt; ComponentName
</span><a href="Distribution.Types.ComponentName.html#CLibName"><span class="hs-identifier hs-var">CLibName</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">InstalledPackageInfo -&gt; LibraryName
</span><a href="Distribution.Types.InstalledPackageInfo.html#sourceLibName"><span class="hs-identifier hs-var hs-var">IPI.sourceLibName</span></a></span><span> </span><span class="annot"><span class="annottext">InstalledPackageInfo
</span><a href="#local-6989586621679725161"><span class="hs-identifier hs-var">ipi</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-169"></span><span>                 </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[(ModuleName, OpenModule)] -&gt; Maybe [(ModuleName, OpenModule)]
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">InstalledPackageInfo -&gt; [(ModuleName, OpenModule)]
</span><a href="Distribution.Types.InstalledPackageInfo.html#instantiatedWith"><span class="hs-identifier hs-var hs-var">IPI.instantiatedWith</span></a></span><span> </span><span class="annot"><span class="annottext">InstalledPackageInfo
</span><a href="#local-6989586621679725161"><span class="hs-identifier hs-var">ipi</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-170"></span><span>               </span><span class="annot"><span class="annottext">Verbosity
-&gt; Compiler
-&gt; ProgramDb
-&gt; PackageDBStack
-&gt; InstalledPackageInfo
-&gt; RegisterOptions
-&gt; IO ()
</span><a href="Distribution.Simple.Register.html#registerPackage"><span class="hs-identifier hs-var">registerPackage</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679725159"><span class="hs-identifier hs-var">verbosity</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">LocalBuildInfo -&gt; Compiler
</span><a href="Distribution.Types.LocalBuildInfo.html#compiler"><span class="hs-identifier hs-var hs-var">compiler</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679725179"><span class="hs-identifier hs-var">lbi</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">LocalBuildInfo -&gt; ProgramDb
</span><a href="Distribution.Types.LocalBuildInfo.html#withPrograms"><span class="hs-identifier hs-var hs-var">withPrograms</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679725179"><span class="hs-identifier hs-var">lbi</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-171"></span><span>                               </span><span class="annot"><span class="annottext">PackageDBStack
</span><a href="#local-6989586621679725154"><span class="hs-identifier hs-var">packageDbs</span></a></span><span> </span><span class="annot"><span class="annottext">InstalledPackageInfo
</span><a href="#local-6989586621679725161"><span class="hs-identifier hs-var">ipi</span></a></span><span> </span><span class="annot"><span class="annottext">RegisterOptions
</span><a href="Distribution.Simple.Program.HcPkg.html#defaultRegisterOptions"><span class="hs-identifier hs-var">HcPkg.defaultRegisterOptions</span></a></span><span>
</span><span id="line-172"></span><span>
</span><span id="line-173"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-174"></span><span>    </span><span id="local-6989586621679725165"><span class="annot"><span class="annottext">modeGenerateRegFile :: Bool
</span><a href="#local-6989586621679725165"><span class="hs-identifier hs-var hs-var">modeGenerateRegFile</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Maybe (Maybe String) -&gt; Bool
forall a. Maybe a -&gt; Bool
</span><a href="../../base/src/Data.Maybe.html#isJust"><span class="hs-identifier hs-var">isJust</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Flag (Maybe String) -&gt; Maybe (Maybe String)
forall a. Flag a -&gt; Maybe a
</span><a href="Distribution.Simple.Flag.html#flagToMaybe"><span class="hs-identifier hs-var">flagToMaybe</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">RegisterFlags -&gt; Flag (Maybe String)
</span><a href="Distribution.Simple.Setup.html#regGenPkgConf"><span class="hs-identifier hs-var hs-var">regGenPkgConf</span></a></span><span> </span><span class="annot"><span class="annottext">RegisterFlags
</span><a href="#local-6989586621679725178"><span class="hs-identifier hs-var">regFlags</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-175"></span><span>    </span><span id="local-6989586621679725146"><span class="annot"><span class="annottext">regFile :: String
</span><a href="#local-6989586621679725146"><span class="hs-identifier hs-var hs-var">regFile</span></a></span></span><span>             </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; Maybe String -&gt; String
forall a. a -&gt; Maybe a -&gt; a
</span><a href="../../base/src/Data.Maybe.html#fromMaybe"><span class="hs-identifier hs-var">fromMaybe</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">PackageIdentifier -&gt; String
forall a. Pretty a =&gt; a -&gt; String
</span><a href="Distribution.Pretty.html#prettyShow"><span class="hs-identifier hs-var">prettyShow</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">PackageDescription -&gt; PackageIdentifier
forall pkg. Package pkg =&gt; pkg -&gt; PackageIdentifier
</span><a href="Distribution.Package.html#packageId"><span class="hs-identifier hs-var">packageId</span></a></span><span> </span><span class="annot"><span class="annottext">PackageDescription
</span><a href="#local-6989586621679725180"><span class="hs-identifier hs-var">pkg</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
</span><a href="../../filepath/src/System.FilePath.Windows.html#%3C.%3E"><span class="hs-operator hs-var">&lt;.&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;conf&quot;</span></span><span class="hs-special">)</span><span>
</span><span id="line-176"></span><span>                                    </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Flag (Maybe String) -&gt; Maybe String
forall a. WithCallStack (Flag a -&gt; a)
</span><a href="Distribution.Simple.Flag.html#fromFlag"><span class="hs-identifier hs-var">fromFlag</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">RegisterFlags -&gt; Flag (Maybe String)
</span><a href="Distribution.Simple.Setup.html#regGenPkgConf"><span class="hs-identifier hs-var hs-var">regGenPkgConf</span></a></span><span> </span><span class="annot"><span class="annottext">RegisterFlags
</span><a href="#local-6989586621679725178"><span class="hs-identifier hs-var">regFlags</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-177"></span><span>
</span><span id="line-178"></span><span>    </span><span id="local-6989586621679725163"><span class="annot"><span class="annottext">modeGenerateRegScript :: Bool
</span><a href="#local-6989586621679725163"><span class="hs-identifier hs-var hs-var">modeGenerateRegScript</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Flag Bool -&gt; Bool
forall a. WithCallStack (Flag a -&gt; a)
</span><a href="Distribution.Simple.Flag.html#fromFlag"><span class="hs-identifier hs-var">fromFlag</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">RegisterFlags -&gt; Flag Bool
</span><a href="Distribution.Simple.Setup.html#regGenScript"><span class="hs-identifier hs-var hs-var">regGenScript</span></a></span><span> </span><span class="annot"><span class="annottext">RegisterFlags
</span><a href="#local-6989586621679725178"><span class="hs-identifier hs-var">regFlags</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-179"></span><span>
</span><span id="line-180"></span><span>    </span><span class="hs-comment">-- FIXME: there's really no guarantee this will work.</span><span>
</span><span id="line-181"></span><span>    </span><span class="hs-comment">-- registering into a totally different db stack can</span><span>
</span><span id="line-182"></span><span>    </span><span class="hs-comment">-- fail if dependencies cannot be satisfied.</span><span>
</span><span id="line-183"></span><span>    </span><span id="local-6989586621679725154"><span class="annot"><span class="annottext">packageDbs :: PackageDBStack
</span><a href="#local-6989586621679725154"><span class="hs-identifier hs-var hs-var">packageDbs</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">PackageDBStack -&gt; PackageDBStack
forall a. Eq a =&gt; [a] -&gt; [a]
</span><a href="../../base/src/Data.OldList.html#nub"><span class="hs-identifier hs-var">nub</span></a></span><span> </span><span class="annot"><span class="annottext">(PackageDBStack -&gt; PackageDBStack)
-&gt; PackageDBStack -&gt; PackageDBStack
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo -&gt; PackageDBStack
</span><a href="Distribution.Types.LocalBuildInfo.html#withPackageDB"><span class="hs-identifier hs-var hs-var">withPackageDB</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679725179"><span class="hs-identifier hs-var">lbi</span></a></span><span>
</span><span id="line-184"></span><span>                    </span><span class="annot"><span class="annottext">PackageDBStack -&gt; PackageDBStack -&gt; PackageDBStack
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe PackageDB -&gt; PackageDBStack
forall a. Maybe a -&gt; [a]
</span><a href="../../base/src/Data.Maybe.html#maybeToList"><span class="hs-identifier hs-var">maybeToList</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Flag PackageDB -&gt; Maybe PackageDB
forall a. Flag a -&gt; Maybe a
</span><a href="Distribution.Simple.Flag.html#flagToMaybe"><span class="hs-identifier hs-var">flagToMaybe</span></a></span><span>  </span><span class="hs-special">(</span><span class="annot"><span class="annottext">RegisterFlags -&gt; Flag PackageDB
</span><a href="Distribution.Simple.Setup.html#regPackageDB"><span class="hs-identifier hs-var hs-var">regPackageDB</span></a></span><span> </span><span class="annot"><span class="annottext">RegisterFlags
</span><a href="#local-6989586621679725178"><span class="hs-identifier hs-var">regFlags</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-185"></span><span>    </span><span id="local-6989586621679725159"><span class="annot"><span class="annottext">verbosity :: Verbosity
</span><a href="#local-6989586621679725159"><span class="hs-identifier hs-var hs-var">verbosity</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Flag Verbosity -&gt; Verbosity
forall a. WithCallStack (Flag a -&gt; a)
</span><a href="Distribution.Simple.Flag.html#fromFlag"><span class="hs-identifier hs-var">fromFlag</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">RegisterFlags -&gt; Flag Verbosity
</span><a href="Distribution.Simple.Setup.html#regVerbosity"><span class="hs-identifier hs-var hs-var">regVerbosity</span></a></span><span> </span><span class="annot"><span class="annottext">RegisterFlags
</span><a href="#local-6989586621679725178"><span class="hs-identifier hs-var">regFlags</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-186"></span><span>
</span><span id="line-187"></span><span>    </span><span id="local-6989586621679725164"><span class="annot"><span class="annottext">writeRegistrationFileOrDirectory :: IO ()
</span><a href="#local-6989586621679725164"><span class="hs-identifier hs-var hs-var">writeRegistrationFileOrDirectory</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-188"></span><span>      </span><span class="hs-comment">-- Handles overwriting both directory and file</span><span>
</span><span id="line-189"></span><span>      </span><span class="annot"><span class="annottext">String -&gt; IO ()
</span><a href="Distribution.Simple.Register.html#deletePackageDB"><span class="hs-identifier hs-var">deletePackageDB</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725146"><span class="hs-identifier hs-var">regFile</span></a></span><span>
</span><span id="line-190"></span><span>      </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">[InstalledPackageInfo]
</span><a href="#local-6989586621679725177"><span class="hs-identifier hs-var">ipis</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-191"></span><span>        </span><span class="hs-special">[</span><span id="local-6989586621679725127"><span class="annot"><span class="annottext">InstalledPackageInfo
</span><a href="#local-6989586621679725127"><span class="hs-identifier hs-var">installedPkgInfo</span></a></span></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-192"></span><span>          </span><span class="annot"><span class="annottext">Verbosity -&gt; String -&gt; IO ()
</span><a href="Distribution.Simple.Utils.html#info"><span class="hs-identifier hs-var">info</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679725159"><span class="hs-identifier hs-var">verbosity</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Creating package registration file: &quot;</span></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725146"><span class="hs-identifier hs-var">regFile</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-193"></span><span>          </span><span class="annot"><span class="annottext">String -&gt; String -&gt; IO ()
</span><a href="Distribution.Utils.Generic.html#writeUTF8File"><span class="hs-identifier hs-var">writeUTF8File</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725146"><span class="hs-identifier hs-var">regFile</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">InstalledPackageInfo -&gt; String
</span><a href="Distribution.InstalledPackageInfo.html#showInstalledPackageInfo"><span class="hs-identifier hs-var">IPI.showInstalledPackageInfo</span></a></span><span> </span><span class="annot"><span class="annottext">InstalledPackageInfo
</span><a href="#local-6989586621679725127"><span class="hs-identifier hs-var">installedPkgInfo</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-194"></span><span>        </span><span class="annot"><span class="annottext">[InstalledPackageInfo]
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-195"></span><span>          </span><span class="annot"><span class="annottext">Verbosity -&gt; String -&gt; IO ()
</span><a href="Distribution.Simple.Utils.html#info"><span class="hs-identifier hs-var">info</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679725159"><span class="hs-identifier hs-var">verbosity</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Creating package registration directory: &quot;</span></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725146"><span class="hs-identifier hs-var">regFile</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-196"></span><span>          </span><span class="annot"><span class="annottext">String -&gt; IO ()
</span><a href="../../directory/src/System.Directory.html#createDirectory"><span class="hs-identifier hs-var">createDirectory</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725146"><span class="hs-identifier hs-var">regFile</span></a></span><span>
</span><span id="line-197"></span><span>          </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621679725123"><span class="annot"><span class="annottext">num_ipis :: Int
</span><a href="#local-6989586621679725123"><span class="hs-identifier hs-var hs-var">num_ipis</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[InstalledPackageInfo] -&gt; Int
forall (t :: * -&gt; *) a. Foldable t =&gt; t a -&gt; Int
</span><a href="../../base/src/Data.Foldable.html#length"><span class="hs-identifier hs-var">length</span></a></span><span> </span><span class="annot"><span class="annottext">[InstalledPackageInfo]
</span><a href="#local-6989586621679725177"><span class="hs-identifier hs-var">ipis</span></a></span><span>
</span><span id="line-198"></span><span>              </span><span id="local-6989586621679725118"><span class="annot"><span class="annottext">lpad :: Int -&gt; String -&gt; String
</span><a href="#local-6989586621679725118"><span class="hs-identifier hs-var hs-var">lpad</span></a></span></span><span> </span><span id="local-6989586621679725117"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679725117"><span class="hs-identifier hs-var">m</span></a></span></span><span> </span><span id="local-6989586621679725116"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725116"><span class="hs-identifier hs-var">xs</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Char -&gt; String
forall a. Int -&gt; a -&gt; [a]
</span><a href="../../base/src/GHC.List.html#replicate"><span class="hs-identifier hs-var">replicate</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679725117"><span class="hs-identifier hs-var">m</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#-"><span class="hs-glyph hs-var">-</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; Int
forall (t :: * -&gt; *) a. Foldable t =&gt; t a -&gt; Int
</span><a href="../../base/src/Data.Foldable.html#length"><span class="hs-identifier hs-var">length</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725114"><span class="hs-identifier hs-var">ys</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'0'</span></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725114"><span class="hs-identifier hs-var">ys</span></a></span><span>
</span><span id="line-199"></span><span>                  </span><span class="hs-keyword">where</span><span> </span><span id="local-6989586621679725114"><span class="annot"><span class="annottext">ys :: String
</span><a href="#local-6989586621679725114"><span class="hs-identifier hs-var hs-var">ys</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; String -&gt; String
forall a. Int -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.List.html#take"><span class="hs-identifier hs-var">take</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679725117"><span class="hs-identifier hs-var">m</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725116"><span class="hs-identifier hs-var">xs</span></a></span><span>
</span><span id="line-200"></span><span>              </span><span id="local-6989586621679725108"><span class="annot"><span class="annottext">number :: a -&gt; String
</span><a href="#local-6989586621679725108"><span class="hs-identifier hs-var hs-var">number</span></a></span></span><span> </span><span id="local-6989586621679725107"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679725107"><span class="hs-identifier hs-var">i</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; String -&gt; String
</span><a href="#local-6989586621679725118"><span class="hs-identifier hs-var">lpad</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; Int
forall (t :: * -&gt; *) a. Foldable t =&gt; t a -&gt; Int
</span><a href="../../base/src/Data.Foldable.html#length"><span class="hs-identifier hs-var">length</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int -&gt; String
forall a. Show a =&gt; a -&gt; String
</span><a href="../../base/src/GHC.Show.html#show"><span class="hs-identifier hs-var">show</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679725123"><span class="hs-identifier hs-var">num_ipis</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a -&gt; String
forall a. Show a =&gt; a -&gt; String
</span><a href="../../base/src/GHC.Show.html#show"><span class="hs-identifier hs-var">show</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679725107"><span class="hs-identifier hs-var">i</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-201"></span><span>          </span><span class="annot"><span class="annottext">[(Int, InstalledPackageInfo)]
-&gt; ((Int, InstalledPackageInfo) -&gt; IO ()) -&gt; IO ()
forall (t :: * -&gt; *) (f :: * -&gt; *) a b.
(Foldable t, Applicative f) =&gt;
t a -&gt; (a -&gt; f b) -&gt; f ()
</span><a href="../../base/src/Data.Foldable.html#for_"><span class="hs-identifier hs-var">for_</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[Int] -&gt; [InstalledPackageInfo] -&gt; [(Int, InstalledPackageInfo)]
forall a b. [a] -&gt; [b] -&gt; [(a, b)]
</span><a href="../../base/src/GHC.List.html#zip"><span class="hs-identifier hs-var">zip</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">[</span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span class="hs-glyph">..</span><span class="hs-special">]</span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span class="hs-special">]</span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[InstalledPackageInfo]
</span><a href="#local-6989586621679725177"><span class="hs-identifier hs-var">ipis</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">(((Int, InstalledPackageInfo) -&gt; IO ()) -&gt; IO ())
-&gt; ((Int, InstalledPackageInfo) -&gt; IO ()) -&gt; IO ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-glyph">\</span><span class="hs-special">(</span><span id="local-6989586621679725105"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679725105"><span class="hs-identifier hs-var">i</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679725104"><span class="annot"><span class="annottext">InstalledPackageInfo
</span><a href="#local-6989586621679725104"><span class="hs-identifier hs-var">installedPkgInfo</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-202"></span><span>            </span><span class="annot"><span class="annottext">String -&gt; String -&gt; IO ()
</span><a href="Distribution.Utils.Generic.html#writeUTF8File"><span class="hs-identifier hs-var">writeUTF8File</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725146"><span class="hs-identifier hs-var">regFile</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
</span><a href="../../filepath/src/System.FilePath.Windows.html#%3C%2F%3E"><span class="hs-operator hs-var">&lt;/&gt;</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int -&gt; String
forall a. Show a =&gt; a -&gt; String
</span><a href="#local-6989586621679725108"><span class="hs-identifier hs-var">number</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679725105"><span class="hs-identifier hs-var">i</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;-&quot;</span></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">UnitId -&gt; String
forall a. Pretty a =&gt; a -&gt; String
</span><a href="Distribution.Pretty.html#prettyShow"><span class="hs-identifier hs-var">prettyShow</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">InstalledPackageInfo -&gt; UnitId
</span><a href="Distribution.Types.InstalledPackageInfo.html#installedUnitId"><span class="hs-identifier hs-var hs-var">IPI.installedUnitId</span></a></span><span> </span><span class="annot"><span class="annottext">InstalledPackageInfo
</span><a href="#local-6989586621679725104"><span class="hs-identifier hs-var">installedPkgInfo</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-203"></span><span>                          </span><span class="hs-special">(</span><span class="annot"><span class="annottext">InstalledPackageInfo -&gt; String
</span><a href="Distribution.InstalledPackageInfo.html#showInstalledPackageInfo"><span class="hs-identifier hs-var">IPI.showInstalledPackageInfo</span></a></span><span> </span><span class="annot"><span class="annottext">InstalledPackageInfo
</span><a href="#local-6989586621679725104"><span class="hs-identifier hs-var">installedPkgInfo</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-204"></span><span>
</span><span id="line-205"></span><span>    </span><span id="local-6989586621679725162"><span class="annot"><span class="annottext">writeRegisterScript :: IO ()
</span><a href="#local-6989586621679725162"><span class="hs-identifier hs-var hs-var">writeRegisterScript</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-206"></span><span>      </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Compiler -&gt; CompilerFlavor
</span><a href="Distribution.Simple.Compiler.html#compilerFlavor"><span class="hs-identifier hs-var">compilerFlavor</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">LocalBuildInfo -&gt; Compiler
</span><a href="Distribution.Types.LocalBuildInfo.html#compiler"><span class="hs-identifier hs-var hs-var">compiler</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679725179"><span class="hs-identifier hs-var">lbi</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-207"></span><span>        </span><span class="annot"><span class="annottext">CompilerFlavor
</span><a href="Distribution.Compiler.html#UHC"><span class="hs-identifier hs-var">UHC</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Verbosity -&gt; String -&gt; IO ()
</span><a href="Distribution.Simple.Utils.html#notice"><span class="hs-identifier hs-var">notice</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679725159"><span class="hs-identifier hs-var">verbosity</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Registration scripts not needed for uhc&quot;</span></span><span>
</span><span id="line-208"></span><span>        </span><span class="annot"><span class="annottext">CompilerFlavor
</span><span class="hs-identifier">_</span></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Verbosity
-&gt; String -&gt; Compiler -&gt; ProgramDb -&gt; (HcPkgInfo -&gt; IO ()) -&gt; IO ()
forall a.
Verbosity
-&gt; String -&gt; Compiler -&gt; ProgramDb -&gt; (HcPkgInfo -&gt; IO a) -&gt; IO a
</span><a href="Distribution.Simple.Register.html#withHcPkg"><span class="hs-identifier hs-var">withHcPkg</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679725159"><span class="hs-identifier hs-var">verbosity</span></a></span><span>
</span><span id="line-209"></span><span>               </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Registration scripts are not implemented for this compiler&quot;</span></span><span>
</span><span id="line-210"></span><span>               </span><span class="hs-special">(</span><span class="annot"><span class="annottext">LocalBuildInfo -&gt; Compiler
</span><a href="Distribution.Types.LocalBuildInfo.html#compiler"><span class="hs-identifier hs-var hs-var">compiler</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679725179"><span class="hs-identifier hs-var">lbi</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">LocalBuildInfo -&gt; ProgramDb
</span><a href="Distribution.Types.LocalBuildInfo.html#withPrograms"><span class="hs-identifier hs-var hs-var">withPrograms</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679725179"><span class="hs-identifier hs-var">lbi</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-211"></span><span>               </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Verbosity
-&gt; [InstalledPackageInfo] -&gt; PackageDBStack -&gt; HcPkgInfo -&gt; IO ()
</span><a href="Distribution.Simple.Register.html#writeHcPkgRegisterScript"><span class="hs-identifier hs-var">writeHcPkgRegisterScript</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679725159"><span class="hs-identifier hs-var">verbosity</span></a></span><span> </span><span class="annot"><span class="annottext">[InstalledPackageInfo]
</span><a href="#local-6989586621679725177"><span class="hs-identifier hs-var">ipis</span></a></span><span> </span><span class="annot"><span class="annottext">PackageDBStack
</span><a href="#local-6989586621679725154"><span class="hs-identifier hs-var">packageDbs</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-212"></span><span>
</span><span id="line-213"></span><span>
</span><span id="line-214"></span><span class="annot"><a href="Distribution.Simple.Register.html#generateRegistrationInfo"><span class="hs-identifier hs-type">generateRegistrationInfo</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Verbosity.html#Verbosity"><span class="hs-identifier hs-type">Verbosity</span></a></span><span>
</span><span id="line-215"></span><span>                         </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.PackageDescription.html#PackageDescription"><span class="hs-identifier hs-type">PackageDescription</span></a></span><span>
</span><span id="line-216"></span><span>                         </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.Library.html#Library"><span class="hs-identifier hs-type">Library</span></a></span><span>
</span><span id="line-217"></span><span>                         </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.LocalBuildInfo.html#LocalBuildInfo"><span class="hs-identifier hs-type">LocalBuildInfo</span></a></span><span>
</span><span id="line-218"></span><span>                         </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.ComponentLocalBuildInfo.html#ComponentLocalBuildInfo"><span class="hs-identifier hs-type">ComponentLocalBuildInfo</span></a></span><span>
</span><span id="line-219"></span><span>                         </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>
</span><span id="line-220"></span><span>                         </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>
</span><span id="line-221"></span><span>                         </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.IO.html#FilePath"><span class="hs-identifier hs-type">FilePath</span></a></span><span>
</span><span id="line-222"></span><span>                         </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.Compiler.html#PackageDB"><span class="hs-identifier hs-type">PackageDB</span></a></span><span>
</span><span id="line-223"></span><span>                         </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="annot"><a href="Distribution.Types.InstalledPackageInfo.html#InstalledPackageInfo"><span class="hs-identifier hs-type">InstalledPackageInfo</span></a></span><span>
</span><span id="line-224"></span><span id="generateRegistrationInfo"><span class="annot"><span class="annottext">generateRegistrationInfo :: Verbosity
-&gt; PackageDescription
-&gt; Library
-&gt; LocalBuildInfo
-&gt; ComponentLocalBuildInfo
-&gt; Bool
-&gt; Bool
-&gt; String
-&gt; PackageDB
-&gt; IO InstalledPackageInfo
</span><a href="Distribution.Simple.Register.html#generateRegistrationInfo"><span class="hs-identifier hs-var hs-var">generateRegistrationInfo</span></a></span></span><span> </span><span id="local-6989586621679725097"><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679725097"><span class="hs-identifier hs-var">verbosity</span></a></span></span><span> </span><span id="local-6989586621679725096"><span class="annot"><span class="annottext">PackageDescription
</span><a href="#local-6989586621679725096"><span class="hs-identifier hs-var">pkg</span></a></span></span><span> </span><span id="local-6989586621679725095"><span class="annot"><span class="annottext">Library
</span><a href="#local-6989586621679725095"><span class="hs-identifier hs-var">lib</span></a></span></span><span> </span><span id="local-6989586621679725094"><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679725094"><span class="hs-identifier hs-var">lbi</span></a></span></span><span> </span><span id="local-6989586621679725093"><span class="annot"><span class="annottext">ComponentLocalBuildInfo
</span><a href="#local-6989586621679725093"><span class="hs-identifier hs-var">clbi</span></a></span></span><span> </span><span id="local-6989586621679725092"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679725092"><span class="hs-identifier hs-var">inplace</span></a></span></span><span> </span><span id="local-6989586621679725091"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679725091"><span class="hs-identifier hs-var">reloc</span></a></span></span><span> </span><span id="local-6989586621679725090"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725090"><span class="hs-identifier hs-var">distPref</span></a></span></span><span> </span><span id="local-6989586621679725089"><span class="annot"><span class="annottext">PackageDB
</span><a href="#local-6989586621679725089"><span class="hs-identifier hs-var">packageDb</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-225"></span><span>  </span><span class="hs-comment">--TODO: eliminate pwd!</span><span>
</span><span id="line-226"></span><span>  </span><span id="local-6989586621679725088"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725088"><span class="hs-identifier hs-var">pwd</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">IO String
</span><a href="../../directory/src/System.Directory.html#getCurrentDirectory"><span class="hs-identifier hs-var">getCurrentDirectory</span></a></span><span>
</span><span id="line-227"></span><span>
</span><span id="line-228"></span><span>  </span><span id="local-6989586621679725086"><span class="annot"><span class="annottext">InstalledPackageInfo
</span><a href="#local-6989586621679725086"><span class="hs-identifier hs-var">installedPkgInfo</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span>
</span><span id="line-229"></span><span>    </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679725092"><span class="hs-identifier hs-var">inplace</span></a></span><span>
</span><span id="line-230"></span><span>      </span><span class="hs-comment">-- NB: With an inplace installation, the user may run './Setup</span><span>
</span><span id="line-231"></span><span>      </span><span class="hs-comment">-- build' to update the library files, without reregistering.</span><span>
</span><span id="line-232"></span><span>      </span><span class="hs-comment">-- In this case, it is critical that the ABI hash not flip.</span><span>
</span><span id="line-233"></span><span>      </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">InstalledPackageInfo -&gt; IO InstalledPackageInfo
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String
-&gt; String
-&gt; PackageDescription
-&gt; AbiHash
-&gt; Library
-&gt; LocalBuildInfo
-&gt; ComponentLocalBuildInfo
-&gt; InstalledPackageInfo
</span><a href="Distribution.Simple.Register.html#inplaceInstalledPackageInfo"><span class="hs-identifier hs-var">inplaceInstalledPackageInfo</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725088"><span class="hs-identifier hs-var">pwd</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725090"><span class="hs-identifier hs-var">distPref</span></a></span><span>
</span><span id="line-234"></span><span>                     </span><span class="annot"><span class="annottext">PackageDescription
</span><a href="#local-6989586621679725096"><span class="hs-identifier hs-var">pkg</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; AbiHash
</span><a href="Distribution.Types.AbiHash.html#mkAbiHash"><span class="hs-identifier hs-var">mkAbiHash</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;inplace&quot;</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Library
</span><a href="#local-6989586621679725095"><span class="hs-identifier hs-var">lib</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679725094"><span class="hs-identifier hs-var">lbi</span></a></span><span> </span><span class="annot"><span class="annottext">ComponentLocalBuildInfo
</span><a href="#local-6989586621679725093"><span class="hs-identifier hs-var">clbi</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-235"></span><span>    </span><span class="hs-keyword">else</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-236"></span><span>        </span><span id="local-6989586621679725084"><span class="annot"><span class="annottext">AbiHash
</span><a href="#local-6989586621679725084"><span class="hs-identifier hs-var">abi_hash</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Verbosity
-&gt; PackageDescription
-&gt; String
-&gt; LocalBuildInfo
-&gt; Library
-&gt; ComponentLocalBuildInfo
-&gt; IO AbiHash
</span><a href="Distribution.Simple.Register.html#abiHash"><span class="hs-identifier hs-var">abiHash</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679725097"><span class="hs-identifier hs-var">verbosity</span></a></span><span> </span><span class="annot"><span class="annottext">PackageDescription
</span><a href="#local-6989586621679725096"><span class="hs-identifier hs-var">pkg</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725090"><span class="hs-identifier hs-var">distPref</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679725094"><span class="hs-identifier hs-var">lbi</span></a></span><span> </span><span class="annot"><span class="annottext">Library
</span><a href="#local-6989586621679725095"><span class="hs-identifier hs-var">lib</span></a></span><span> </span><span class="annot"><span class="annottext">ComponentLocalBuildInfo
</span><a href="#local-6989586621679725093"><span class="hs-identifier hs-var">clbi</span></a></span><span>
</span><span id="line-237"></span><span>        </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679725091"><span class="hs-identifier hs-var">reloc</span></a></span><span>
</span><span id="line-238"></span><span>          </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">Verbosity
-&gt; PackageDescription
-&gt; Library
-&gt; LocalBuildInfo
-&gt; ComponentLocalBuildInfo
-&gt; AbiHash
-&gt; PackageDB
-&gt; IO InstalledPackageInfo
</span><a href="Distribution.Simple.Register.html#relocRegistrationInfo"><span class="hs-identifier hs-var">relocRegistrationInfo</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679725097"><span class="hs-identifier hs-var">verbosity</span></a></span><span>
</span><span id="line-239"></span><span>                         </span><span class="annot"><span class="annottext">PackageDescription
</span><a href="#local-6989586621679725096"><span class="hs-identifier hs-var">pkg</span></a></span><span> </span><span class="annot"><span class="annottext">Library
</span><a href="#local-6989586621679725095"><span class="hs-identifier hs-var">lib</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679725094"><span class="hs-identifier hs-var">lbi</span></a></span><span> </span><span class="annot"><span class="annottext">ComponentLocalBuildInfo
</span><a href="#local-6989586621679725093"><span class="hs-identifier hs-var">clbi</span></a></span><span> </span><span class="annot"><span class="annottext">AbiHash
</span><a href="#local-6989586621679725084"><span class="hs-identifier hs-var">abi_hash</span></a></span><span> </span><span class="annot"><span class="annottext">PackageDB
</span><a href="#local-6989586621679725089"><span class="hs-identifier hs-var">packageDb</span></a></span><span>
</span><span id="line-240"></span><span>          </span><span class="hs-keyword">else</span><span> </span><span class="annot"><span class="annottext">InstalledPackageInfo -&gt; IO InstalledPackageInfo
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">PackageDescription
-&gt; AbiHash
-&gt; Library
-&gt; LocalBuildInfo
-&gt; ComponentLocalBuildInfo
-&gt; InstalledPackageInfo
</span><a href="Distribution.Simple.Register.html#absoluteInstalledPackageInfo"><span class="hs-identifier hs-var">absoluteInstalledPackageInfo</span></a></span><span>
</span><span id="line-241"></span><span>                         </span><span class="annot"><span class="annottext">PackageDescription
</span><a href="#local-6989586621679725096"><span class="hs-identifier hs-var">pkg</span></a></span><span> </span><span class="annot"><span class="annottext">AbiHash
</span><a href="#local-6989586621679725084"><span class="hs-identifier hs-var">abi_hash</span></a></span><span> </span><span class="annot"><span class="annottext">Library
</span><a href="#local-6989586621679725095"><span class="hs-identifier hs-var">lib</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679725094"><span class="hs-identifier hs-var">lbi</span></a></span><span> </span><span class="annot"><span class="annottext">ComponentLocalBuildInfo
</span><a href="#local-6989586621679725093"><span class="hs-identifier hs-var">clbi</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-242"></span><span>
</span><span id="line-243"></span><span>
</span><span id="line-244"></span><span>  </span><span class="annot"><span class="annottext">InstalledPackageInfo -&gt; IO InstalledPackageInfo
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">InstalledPackageInfo
</span><a href="#local-6989586621679725086"><span class="hs-identifier hs-var">installedPkgInfo</span></a></span><span>
</span><span id="line-245"></span><span>
</span><span id="line-246"></span><span class="hs-comment">-- | Compute the 'AbiHash' of a library that we built inplace.</span><span>
</span><span id="line-247"></span><span class="annot"><a href="Distribution.Simple.Register.html#abiHash"><span class="hs-identifier hs-type">abiHash</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Verbosity.html#Verbosity"><span class="hs-identifier hs-type">Verbosity</span></a></span><span>
</span><span id="line-248"></span><span>        </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.PackageDescription.html#PackageDescription"><span class="hs-identifier hs-type">PackageDescription</span></a></span><span>
</span><span id="line-249"></span><span>        </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.IO.html#FilePath"><span class="hs-identifier hs-type">FilePath</span></a></span><span>
</span><span id="line-250"></span><span>        </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.LocalBuildInfo.html#LocalBuildInfo"><span class="hs-identifier hs-type">LocalBuildInfo</span></a></span><span>
</span><span id="line-251"></span><span>        </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.Library.html#Library"><span class="hs-identifier hs-type">Library</span></a></span><span>
</span><span id="line-252"></span><span>        </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.ComponentLocalBuildInfo.html#ComponentLocalBuildInfo"><span class="hs-identifier hs-type">ComponentLocalBuildInfo</span></a></span><span>
</span><span id="line-253"></span><span>        </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="annot"><a href="Distribution.Types.AbiHash.html#AbiHash"><span class="hs-identifier hs-type">AbiHash</span></a></span><span>
</span><span id="line-254"></span><span id="abiHash"><span class="annot"><span class="annottext">abiHash :: Verbosity
-&gt; PackageDescription
-&gt; String
-&gt; LocalBuildInfo
-&gt; Library
-&gt; ComponentLocalBuildInfo
-&gt; IO AbiHash
</span><a href="Distribution.Simple.Register.html#abiHash"><span class="hs-identifier hs-var hs-var">abiHash</span></a></span></span><span> </span><span id="local-6989586621679725082"><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679725082"><span class="hs-identifier hs-var">verbosity</span></a></span></span><span> </span><span id="local-6989586621679725081"><span class="annot"><span class="annottext">PackageDescription
</span><a href="#local-6989586621679725081"><span class="hs-identifier hs-var">pkg</span></a></span></span><span> </span><span id="local-6989586621679725080"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725080"><span class="hs-identifier hs-var">distPref</span></a></span></span><span> </span><span id="local-6989586621679725079"><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679725079"><span class="hs-identifier hs-var">lbi</span></a></span></span><span> </span><span id="local-6989586621679725078"><span class="annot"><span class="annottext">Library
</span><a href="#local-6989586621679725078"><span class="hs-identifier hs-var">lib</span></a></span></span><span> </span><span id="local-6989586621679725077"><span class="annot"><span class="annottext">ComponentLocalBuildInfo
</span><a href="#local-6989586621679725077"><span class="hs-identifier hs-var">clbi</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-255"></span><span>    </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Compiler -&gt; CompilerFlavor
</span><a href="Distribution.Simple.Compiler.html#compilerFlavor"><span class="hs-identifier hs-var">compilerFlavor</span></a></span><span> </span><span class="annot"><span class="annottext">Compiler
</span><a href="#local-6989586621679725076"><span class="hs-identifier hs-var">comp</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-256"></span><span>     </span><span class="annot"><span class="annottext">CompilerFlavor
</span><a href="Distribution.Compiler.html#GHC"><span class="hs-identifier hs-var">GHC</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-257"></span><span>            </span><span class="annot"><span class="annottext">(String -&gt; AbiHash) -&gt; IO String -&gt; IO AbiHash
forall (f :: * -&gt; *) a b. Functor f =&gt; (a -&gt; b) -&gt; f a -&gt; f b
</span><a href="../../base/src/GHC.Base.html#fmap"><span class="hs-identifier hs-var">fmap</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; AbiHash
</span><a href="Distribution.Types.AbiHash.html#mkAbiHash"><span class="hs-identifier hs-var">mkAbiHash</span></a></span><span> </span><span class="annot"><span class="annottext">(IO String -&gt; IO AbiHash) -&gt; IO String -&gt; IO AbiHash
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity
-&gt; PackageDescription
-&gt; LocalBuildInfo
-&gt; Library
-&gt; ComponentLocalBuildInfo
-&gt; IO String
</span><a href="Distribution.Simple.GHC.html#libAbiHash"><span class="hs-identifier hs-var">GHC.libAbiHash</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679725082"><span class="hs-identifier hs-var">verbosity</span></a></span><span> </span><span class="annot"><span class="annottext">PackageDescription
</span><a href="#local-6989586621679725081"><span class="hs-identifier hs-var">pkg</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679725073"><span class="hs-identifier hs-var">lbi'</span></a></span><span> </span><span class="annot"><span class="annottext">Library
</span><a href="#local-6989586621679725078"><span class="hs-identifier hs-var">lib</span></a></span><span> </span><span class="annot"><span class="annottext">ComponentLocalBuildInfo
</span><a href="#local-6989586621679725077"><span class="hs-identifier hs-var">clbi</span></a></span><span>
</span><span id="line-258"></span><span>     </span><span class="annot"><span class="annottext">CompilerFlavor
</span><a href="Distribution.Compiler.html#GHCJS"><span class="hs-identifier hs-var">GHCJS</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-259"></span><span>            </span><span class="annot"><span class="annottext">(String -&gt; AbiHash) -&gt; IO String -&gt; IO AbiHash
forall (f :: * -&gt; *) a b. Functor f =&gt; (a -&gt; b) -&gt; f a -&gt; f b
</span><a href="../../base/src/GHC.Base.html#fmap"><span class="hs-identifier hs-var">fmap</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; AbiHash
</span><a href="Distribution.Types.AbiHash.html#mkAbiHash"><span class="hs-identifier hs-var">mkAbiHash</span></a></span><span> </span><span class="annot"><span class="annottext">(IO String -&gt; IO AbiHash) -&gt; IO String -&gt; IO AbiHash
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity
-&gt; PackageDescription
-&gt; LocalBuildInfo
-&gt; Library
-&gt; ComponentLocalBuildInfo
-&gt; IO String
</span><a href="Distribution.Simple.GHCJS.html#libAbiHash"><span class="hs-identifier hs-var">GHCJS.libAbiHash</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679725082"><span class="hs-identifier hs-var">verbosity</span></a></span><span> </span><span class="annot"><span class="annottext">PackageDescription
</span><a href="#local-6989586621679725081"><span class="hs-identifier hs-var">pkg</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679725073"><span class="hs-identifier hs-var">lbi'</span></a></span><span> </span><span class="annot"><span class="annottext">Library
</span><a href="#local-6989586621679725078"><span class="hs-identifier hs-var">lib</span></a></span><span> </span><span class="annot"><span class="annottext">ComponentLocalBuildInfo
</span><a href="#local-6989586621679725077"><span class="hs-identifier hs-var">clbi</span></a></span><span>
</span><span id="line-260"></span><span>     </span><span class="annot"><span class="annottext">CompilerFlavor
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">AbiHash -&gt; IO AbiHash
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; AbiHash
</span><a href="Distribution.Types.AbiHash.html#mkAbiHash"><span class="hs-identifier hs-var">mkAbiHash</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;&quot;</span></span><span class="hs-special">)</span><span>
</span><span id="line-261"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-262"></span><span>    </span><span id="local-6989586621679725076"><span class="annot"><span class="annottext">comp :: Compiler
</span><a href="#local-6989586621679725076"><span class="hs-identifier hs-var hs-var">comp</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo -&gt; Compiler
</span><a href="Distribution.Types.LocalBuildInfo.html#compiler"><span class="hs-identifier hs-var hs-var">compiler</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679725079"><span class="hs-identifier hs-var">lbi</span></a></span><span>
</span><span id="line-263"></span><span>    </span><span id="local-6989586621679725073"><span class="annot"><span class="annottext">lbi' :: LocalBuildInfo
</span><a href="#local-6989586621679725073"><span class="hs-identifier hs-var hs-var">lbi'</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679725079"><span class="hs-identifier hs-var">lbi</span></a></span><span> </span><span class="hs-special">{</span><span>
</span><span id="line-264"></span><span>              </span><span class="annot"><span class="annottext">withPackageDB :: PackageDBStack
</span><a href="Distribution.Types.LocalBuildInfo.html#withPackageDB"><span class="hs-identifier hs-var">withPackageDB</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo -&gt; PackageDBStack
</span><a href="Distribution.Types.LocalBuildInfo.html#withPackageDB"><span class="hs-identifier hs-var hs-var">withPackageDB</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679725079"><span class="hs-identifier hs-var">lbi</span></a></span><span>
</span><span id="line-265"></span><span>                  </span><span class="annot"><span class="annottext">PackageDBStack -&gt; PackageDBStack -&gt; PackageDBStack
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">String -&gt; PackageDB
</span><a href="Distribution.Simple.Compiler.html#SpecificPackageDB"><span class="hs-identifier hs-var">SpecificPackageDB</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">LocalBuildInfo -&gt; String -&gt; String
</span><a href="Distribution.Simple.Register.html#internalPackageDBPath"><span class="hs-identifier hs-var">internalPackageDBPath</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679725079"><span class="hs-identifier hs-var">lbi</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725080"><span class="hs-identifier hs-var">distPref</span></a></span><span class="hs-special">)</span><span class="hs-special">]</span><span>
</span><span id="line-266"></span><span>           </span><span class="hs-special">}</span><span>
</span><span id="line-267"></span><span>
</span><span id="line-268"></span><span class="annot"><a href="Distribution.Simple.Register.html#relocRegistrationInfo"><span class="hs-identifier hs-type">relocRegistrationInfo</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Verbosity.html#Verbosity"><span class="hs-identifier hs-type">Verbosity</span></a></span><span>
</span><span id="line-269"></span><span>                      </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.PackageDescription.html#PackageDescription"><span class="hs-identifier hs-type">PackageDescription</span></a></span><span>
</span><span id="line-270"></span><span>                      </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.Library.html#Library"><span class="hs-identifier hs-type">Library</span></a></span><span>
</span><span id="line-271"></span><span>                      </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.LocalBuildInfo.html#LocalBuildInfo"><span class="hs-identifier hs-type">LocalBuildInfo</span></a></span><span>
</span><span id="line-272"></span><span>                      </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.ComponentLocalBuildInfo.html#ComponentLocalBuildInfo"><span class="hs-identifier hs-type">ComponentLocalBuildInfo</span></a></span><span>
</span><span id="line-273"></span><span>                      </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.AbiHash.html#AbiHash"><span class="hs-identifier hs-type">AbiHash</span></a></span><span>
</span><span id="line-274"></span><span>                      </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.Compiler.html#PackageDB"><span class="hs-identifier hs-type">PackageDB</span></a></span><span>
</span><span id="line-275"></span><span>                      </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="annot"><a href="Distribution.Types.InstalledPackageInfo.html#InstalledPackageInfo"><span class="hs-identifier hs-type">InstalledPackageInfo</span></a></span><span>
</span><span id="line-276"></span><span id="relocRegistrationInfo"><span class="annot"><span class="annottext">relocRegistrationInfo :: Verbosity
-&gt; PackageDescription
-&gt; Library
-&gt; LocalBuildInfo
-&gt; ComponentLocalBuildInfo
-&gt; AbiHash
-&gt; PackageDB
-&gt; IO InstalledPackageInfo
</span><a href="Distribution.Simple.Register.html#relocRegistrationInfo"><span class="hs-identifier hs-var hs-var">relocRegistrationInfo</span></a></span></span><span> </span><span id="local-6989586621679725069"><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679725069"><span class="hs-identifier hs-var">verbosity</span></a></span></span><span> </span><span id="local-6989586621679725068"><span class="annot"><span class="annottext">PackageDescription
</span><a href="#local-6989586621679725068"><span class="hs-identifier hs-var">pkg</span></a></span></span><span> </span><span id="local-6989586621679725067"><span class="annot"><span class="annottext">Library
</span><a href="#local-6989586621679725067"><span class="hs-identifier hs-var">lib</span></a></span></span><span> </span><span id="local-6989586621679725066"><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679725066"><span class="hs-identifier hs-var">lbi</span></a></span></span><span> </span><span id="local-6989586621679725065"><span class="annot"><span class="annottext">ComponentLocalBuildInfo
</span><a href="#local-6989586621679725065"><span class="hs-identifier hs-var">clbi</span></a></span></span><span> </span><span id="local-6989586621679725064"><span class="annot"><span class="annottext">AbiHash
</span><a href="#local-6989586621679725064"><span class="hs-identifier hs-var">abi_hash</span></a></span></span><span> </span><span id="local-6989586621679725063"><span class="annot"><span class="annottext">PackageDB
</span><a href="#local-6989586621679725063"><span class="hs-identifier hs-var">packageDb</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-277"></span><span>  </span><span class="hs-keyword">case</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Compiler -&gt; CompilerFlavor
</span><a href="Distribution.Simple.Compiler.html#compilerFlavor"><span class="hs-identifier hs-var">compilerFlavor</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">LocalBuildInfo -&gt; Compiler
</span><a href="Distribution.Types.LocalBuildInfo.html#compiler"><span class="hs-identifier hs-var hs-var">compiler</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679725066"><span class="hs-identifier hs-var">lbi</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-278"></span><span>    </span><span class="annot"><span class="annottext">CompilerFlavor
</span><a href="Distribution.Compiler.html#GHC"><span class="hs-identifier hs-var">GHC</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">do</span><span> </span><span id="local-6989586621679725062"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725062"><span class="hs-identifier hs-var">fs</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Verbosity -&gt; LocalBuildInfo -&gt; PackageDB -&gt; IO String
</span><a href="Distribution.Simple.GHC.html#pkgRoot"><span class="hs-identifier hs-var">GHC.pkgRoot</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679725069"><span class="hs-identifier hs-var">verbosity</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679725066"><span class="hs-identifier hs-var">lbi</span></a></span><span> </span><span class="annot"><span class="annottext">PackageDB
</span><a href="#local-6989586621679725063"><span class="hs-identifier hs-var">packageDb</span></a></span><span>
</span><span id="line-279"></span><span>              </span><span class="annot"><span class="annottext">InstalledPackageInfo -&gt; IO InstalledPackageInfo
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">PackageDescription
-&gt; AbiHash
-&gt; Library
-&gt; LocalBuildInfo
-&gt; ComponentLocalBuildInfo
-&gt; String
-&gt; InstalledPackageInfo
</span><a href="Distribution.Simple.Register.html#relocatableInstalledPackageInfo"><span class="hs-identifier hs-var">relocatableInstalledPackageInfo</span></a></span><span>
</span><span id="line-280"></span><span>                        </span><span class="annot"><span class="annottext">PackageDescription
</span><a href="#local-6989586621679725068"><span class="hs-identifier hs-var">pkg</span></a></span><span> </span><span class="annot"><span class="annottext">AbiHash
</span><a href="#local-6989586621679725064"><span class="hs-identifier hs-var">abi_hash</span></a></span><span> </span><span class="annot"><span class="annottext">Library
</span><a href="#local-6989586621679725067"><span class="hs-identifier hs-var">lib</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679725066"><span class="hs-identifier hs-var">lbi</span></a></span><span> </span><span class="annot"><span class="annottext">ComponentLocalBuildInfo
</span><a href="#local-6989586621679725065"><span class="hs-identifier hs-var">clbi</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725062"><span class="hs-identifier hs-var">fs</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-281"></span><span>    </span><span class="annot"><span class="annottext">CompilerFlavor
</span><span class="hs-identifier">_</span></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Verbosity -&gt; String -&gt; IO InstalledPackageInfo
forall a. Verbosity -&gt; String -&gt; IO a
</span><a href="Distribution.Simple.Utils.html#die%27"><span class="hs-identifier hs-var">die'</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679725069"><span class="hs-identifier hs-var">verbosity</span></a></span><span>
</span><span id="line-282"></span><span>              </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Distribution.Simple.Register.relocRegistrationInfo: \
               \not implemented for this compiler&quot;</span></span><span>
</span><span id="line-284"></span><span>
</span><span id="line-285"></span><span class="annot"><a href="Distribution.Simple.Register.html#initPackageDB"><span class="hs-identifier hs-type">initPackageDB</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Verbosity.html#Verbosity"><span class="hs-identifier hs-type">Verbosity</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.Compiler.html#Compiler"><span class="hs-identifier hs-type">Compiler</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.Program.Db.html#ProgramDb"><span class="hs-identifier hs-type">ProgramDb</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.IO.html#FilePath"><span class="hs-identifier hs-type">FilePath</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-286"></span><span id="initPackageDB"><span class="annot"><span class="annottext">initPackageDB :: Verbosity -&gt; Compiler -&gt; ProgramDb -&gt; String -&gt; IO ()
</span><a href="Distribution.Simple.Register.html#initPackageDB"><span class="hs-identifier hs-var hs-var">initPackageDB</span></a></span></span><span> </span><span id="local-6989586621679725058"><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679725058"><span class="hs-identifier hs-var">verbosity</span></a></span></span><span> </span><span id="local-6989586621679725057"><span class="annot"><span class="annottext">Compiler
</span><a href="#local-6989586621679725057"><span class="hs-identifier hs-var">comp</span></a></span></span><span> </span><span id="local-6989586621679725056"><span class="annot"><span class="annottext">ProgramDb
</span><a href="#local-6989586621679725056"><span class="hs-identifier hs-var">progdb</span></a></span></span><span> </span><span id="local-6989586621679725055"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725055"><span class="hs-identifier hs-var">dbPath</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-287"></span><span>    </span><span class="annot"><span class="annottext">Verbosity -&gt; Compiler -&gt; ProgramDb -&gt; Bool -&gt; String -&gt; IO ()
</span><a href="Distribution.Simple.Register.html#createPackageDB"><span class="hs-identifier hs-var">createPackageDB</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679725058"><span class="hs-identifier hs-var">verbosity</span></a></span><span> </span><span class="annot"><span class="annottext">Compiler
</span><a href="#local-6989586621679725057"><span class="hs-identifier hs-var">comp</span></a></span><span> </span><span class="annot"><span class="annottext">ProgramDb
</span><a href="#local-6989586621679725056"><span class="hs-identifier hs-var">progdb</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725055"><span class="hs-identifier hs-var">dbPath</span></a></span><span>
</span><span id="line-288"></span><span>
</span><span id="line-289"></span><span class="hs-comment">-- | Create an empty package DB at the specified location.</span><span>
</span><span id="line-290"></span><span class="annot"><a href="Distribution.Simple.Register.html#createPackageDB"><span class="hs-identifier hs-type">createPackageDB</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Verbosity.html#Verbosity"><span class="hs-identifier hs-type">Verbosity</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.Compiler.html#Compiler"><span class="hs-identifier hs-type">Compiler</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.Program.Db.html#ProgramDb"><span class="hs-identifier hs-type">ProgramDb</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>
</span><span id="line-291"></span><span>                </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.IO.html#FilePath"><span class="hs-identifier hs-type">FilePath</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-292"></span><span id="createPackageDB"><span class="annot"><span class="annottext">createPackageDB :: Verbosity -&gt; Compiler -&gt; ProgramDb -&gt; Bool -&gt; String -&gt; IO ()
</span><a href="Distribution.Simple.Register.html#createPackageDB"><span class="hs-identifier hs-var hs-var">createPackageDB</span></a></span></span><span> </span><span id="local-6989586621679725054"><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679725054"><span class="hs-identifier hs-var">verbosity</span></a></span></span><span> </span><span id="local-6989586621679725053"><span class="annot"><span class="annottext">Compiler
</span><a href="#local-6989586621679725053"><span class="hs-identifier hs-var">comp</span></a></span></span><span> </span><span id="local-6989586621679725052"><span class="annot"><span class="annottext">ProgramDb
</span><a href="#local-6989586621679725052"><span class="hs-identifier hs-var">progdb</span></a></span></span><span> </span><span id="local-6989586621679725051"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679725051"><span class="hs-identifier hs-var">preferCompat</span></a></span></span><span> </span><span id="local-6989586621679725050"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725050"><span class="hs-identifier hs-var">dbPath</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-293"></span><span>    </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Compiler -&gt; CompilerFlavor
</span><a href="Distribution.Simple.Compiler.html#compilerFlavor"><span class="hs-identifier hs-var">compilerFlavor</span></a></span><span> </span><span class="annot"><span class="annottext">Compiler
</span><a href="#local-6989586621679725053"><span class="hs-identifier hs-var">comp</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-294"></span><span>      </span><span class="annot"><span class="annottext">CompilerFlavor
</span><a href="Distribution.Compiler.html#GHC"><span class="hs-identifier hs-var">GHC</span></a></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">HcPkgInfo -&gt; Verbosity -&gt; Bool -&gt; String -&gt; IO ()
</span><a href="Distribution.Simple.Program.HcPkg.html#init"><span class="hs-identifier hs-var">HcPkg.init</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ProgramDb -&gt; HcPkgInfo
</span><a href="Distribution.Simple.GHC.html#hcPkgInfo"><span class="hs-identifier hs-var">GHC.hcPkgInfo</span></a></span><span>   </span><span class="annot"><span class="annottext">ProgramDb
</span><a href="#local-6989586621679725052"><span class="hs-identifier hs-var">progdb</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679725054"><span class="hs-identifier hs-var">verbosity</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679725051"><span class="hs-identifier hs-var">preferCompat</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725050"><span class="hs-identifier hs-var">dbPath</span></a></span><span>
</span><span id="line-295"></span><span>      </span><span class="annot"><span class="annottext">CompilerFlavor
</span><a href="Distribution.Compiler.html#GHCJS"><span class="hs-identifier hs-var">GHCJS</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">HcPkgInfo -&gt; Verbosity -&gt; Bool -&gt; String -&gt; IO ()
</span><a href="Distribution.Simple.Program.HcPkg.html#init"><span class="hs-identifier hs-var">HcPkg.init</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ProgramDb -&gt; HcPkgInfo
</span><a href="Distribution.Simple.GHCJS.html#hcPkgInfo"><span class="hs-identifier hs-var">GHCJS.hcPkgInfo</span></a></span><span> </span><span class="annot"><span class="annottext">ProgramDb
</span><a href="#local-6989586621679725052"><span class="hs-identifier hs-var">progdb</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679725054"><span class="hs-identifier hs-var">verbosity</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725050"><span class="hs-identifier hs-var">dbPath</span></a></span><span>
</span><span id="line-296"></span><span>      </span><span class="annot"><span class="annottext">CompilerFlavor
</span><a href="Distribution.Compiler.html#UHC"><span class="hs-identifier hs-var">UHC</span></a></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">() -&gt; IO ()
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-297"></span><span>      </span><span class="annot"><a href="Distribution.Compiler.html#HaskellSuite"><span class="hs-identifier hs-type">HaskellSuite</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Verbosity -&gt; ProgramDb -&gt; String -&gt; IO ()
</span><a href="Distribution.Simple.HaskellSuite.html#initPackageDB"><span class="hs-identifier hs-var">HaskellSuite.initPackageDB</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679725054"><span class="hs-identifier hs-var">verbosity</span></a></span><span> </span><span class="annot"><span class="annottext">ProgramDb
</span><a href="#local-6989586621679725052"><span class="hs-identifier hs-var">progdb</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725050"><span class="hs-identifier hs-var">dbPath</span></a></span><span>
</span><span id="line-298"></span><span>      </span><span class="annot"><span class="annottext">CompilerFlavor
</span><span class="hs-identifier">_</span></span><span>              </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Verbosity -&gt; String -&gt; IO ()
forall a. Verbosity -&gt; String -&gt; IO a
</span><a href="Distribution.Simple.Utils.html#die%27"><span class="hs-identifier hs-var">die'</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679725054"><span class="hs-identifier hs-var">verbosity</span></a></span><span> </span><span class="annot"><span class="annottext">(String -&gt; IO ()) -&gt; String -&gt; IO ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-299"></span><span>                              </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Distribution.Simple.Register.createPackageDB: &quot;</span></span><span>
</span><span id="line-300"></span><span>                           </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;not implemented for this compiler&quot;</span></span><span>
</span><span id="line-301"></span><span>
</span><span id="line-302"></span><span class="annot"><a href="Distribution.Simple.Register.html#doesPackageDBExist"><span class="hs-identifier hs-type">doesPackageDBExist</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.IO.html#FilePath"><span class="hs-identifier hs-type">FilePath</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>
</span><span id="line-303"></span><span id="doesPackageDBExist"><span class="annot"><span class="annottext">doesPackageDBExist :: String -&gt; IO Bool
</span><a href="Distribution.Simple.Register.html#doesPackageDBExist"><span class="hs-identifier hs-var hs-var">doesPackageDBExist</span></a></span></span><span> </span><span id="local-6989586621679725044"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725044"><span class="hs-identifier hs-var">dbPath</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-304"></span><span>    </span><span class="hs-comment">-- currently one impl for all compiler flavours, but could change if needed</span><span>
</span><span id="line-305"></span><span>    </span><span id="local-6989586621679725043"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679725043"><span class="hs-identifier hs-var">dir_exists</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">String -&gt; IO Bool
</span><a href="../../directory/src/System.Directory.html#doesDirectoryExist"><span class="hs-identifier hs-var">doesDirectoryExist</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725044"><span class="hs-identifier hs-var">dbPath</span></a></span><span>
</span><span id="line-306"></span><span>    </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679725043"><span class="hs-identifier hs-var">dir_exists</span></a></span><span>
</span><span id="line-307"></span><span>        </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; IO Bool
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>
</span><span id="line-308"></span><span>        </span><span class="hs-keyword">else</span><span> </span><span class="annot"><span class="annottext">String -&gt; IO Bool
</span><a href="../../directory/src/System.Directory.html#doesFileExist"><span class="hs-identifier hs-var">doesFileExist</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725044"><span class="hs-identifier hs-var">dbPath</span></a></span><span>
</span><span id="line-309"></span><span>
</span><span id="line-310"></span><span class="annot"><a href="Distribution.Simple.Register.html#deletePackageDB"><span class="hs-identifier hs-type">deletePackageDB</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.IO.html#FilePath"><span class="hs-identifier hs-type">FilePath</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-311"></span><span id="deletePackageDB"><span class="annot"><span class="annottext">deletePackageDB :: String -&gt; IO ()
</span><a href="Distribution.Simple.Register.html#deletePackageDB"><span class="hs-identifier hs-var hs-var">deletePackageDB</span></a></span></span><span> </span><span id="local-6989586621679725040"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725040"><span class="hs-identifier hs-var">dbPath</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-312"></span><span>    </span><span class="hs-comment">-- currently one impl for all compiler flavours, but could change if needed</span><span>
</span><span id="line-313"></span><span>    </span><span id="local-6989586621679725039"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679725039"><span class="hs-identifier hs-var">dir_exists</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">String -&gt; IO Bool
</span><a href="../../directory/src/System.Directory.html#doesDirectoryExist"><span class="hs-identifier hs-var">doesDirectoryExist</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725040"><span class="hs-identifier hs-var">dbPath</span></a></span><span>
</span><span id="line-314"></span><span>    </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679725039"><span class="hs-identifier hs-var">dir_exists</span></a></span><span>
</span><span id="line-315"></span><span>        </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">String -&gt; IO ()
</span><a href="../../directory/src/System.Directory.html#removeDirectoryRecursive"><span class="hs-identifier hs-var">removeDirectoryRecursive</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725040"><span class="hs-identifier hs-var">dbPath</span></a></span><span>
</span><span id="line-316"></span><span>        </span><span class="hs-keyword">else</span><span> </span><span class="hs-keyword">do</span><span> </span><span id="local-6989586621679725037"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679725037"><span class="hs-identifier hs-var">file_exists</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">String -&gt; IO Bool
</span><a href="../../directory/src/System.Directory.html#doesFileExist"><span class="hs-identifier hs-var">doesFileExist</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725040"><span class="hs-identifier hs-var">dbPath</span></a></span><span>
</span><span id="line-317"></span><span>                </span><span class="annot"><span class="annottext">Bool -&gt; IO () -&gt; IO ()
forall (f :: * -&gt; *). Applicative f =&gt; Bool -&gt; f () -&gt; f ()
</span><a href="../../base/src/GHC.Base.html#when"><span class="hs-identifier hs-var">when</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679725037"><span class="hs-identifier hs-var">file_exists</span></a></span><span> </span><span class="annot"><span class="annottext">(IO () -&gt; IO ()) -&gt; IO () -&gt; IO ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; IO ()
</span><a href="../../directory/src/System.Directory.html#removeFile"><span class="hs-identifier hs-var">removeFile</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725040"><span class="hs-identifier hs-var">dbPath</span></a></span><span>
</span><span id="line-318"></span><span>
</span><span id="line-319"></span><span class="hs-comment">-- | Run @hc-pkg@ using a given package DB stack, directly forwarding the</span><span>
</span><span id="line-320"></span><span class="hs-comment">-- provided command-line arguments to it.</span><span>
</span><span id="line-321"></span><span class="annot"><a href="Distribution.Simple.Register.html#invokeHcPkg"><span class="hs-identifier hs-type">invokeHcPkg</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Verbosity.html#Verbosity"><span class="hs-identifier hs-type">Verbosity</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.Compiler.html#Compiler"><span class="hs-identifier hs-type">Compiler</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.Program.Db.html#ProgramDb"><span class="hs-identifier hs-type">ProgramDb</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.Compiler.html#PackageDBStack"><span class="hs-identifier hs-type">PackageDBStack</span></a></span><span>
</span><span id="line-322"></span><span>                </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-323"></span><span id="invokeHcPkg"><span class="annot"><span class="annottext">invokeHcPkg :: Verbosity
-&gt; Compiler -&gt; ProgramDb -&gt; PackageDBStack -&gt; [String] -&gt; IO ()
</span><a href="Distribution.Simple.Register.html#invokeHcPkg"><span class="hs-identifier hs-var hs-var">invokeHcPkg</span></a></span></span><span> </span><span id="local-6989586621679725035"><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679725035"><span class="hs-identifier hs-var">verbosity</span></a></span></span><span> </span><span id="local-6989586621679725034"><span class="annot"><span class="annottext">Compiler
</span><a href="#local-6989586621679725034"><span class="hs-identifier hs-var">comp</span></a></span></span><span> </span><span id="local-6989586621679725033"><span class="annot"><span class="annottext">ProgramDb
</span><a href="#local-6989586621679725033"><span class="hs-identifier hs-var">progdb</span></a></span></span><span> </span><span id="local-6989586621679725032"><span class="annot"><span class="annottext">PackageDBStack
</span><a href="#local-6989586621679725032"><span class="hs-identifier hs-var">dbStack</span></a></span></span><span> </span><span id="local-6989586621679725031"><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679725031"><span class="hs-identifier hs-var">extraArgs</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-324"></span><span>  </span><span class="annot"><span class="annottext">Verbosity
-&gt; String -&gt; Compiler -&gt; ProgramDb -&gt; (HcPkgInfo -&gt; IO ()) -&gt; IO ()
forall a.
Verbosity
-&gt; String -&gt; Compiler -&gt; ProgramDb -&gt; (HcPkgInfo -&gt; IO a) -&gt; IO a
</span><a href="Distribution.Simple.Register.html#withHcPkg"><span class="hs-identifier hs-var">withHcPkg</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679725035"><span class="hs-identifier hs-var">verbosity</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;invokeHcPkg&quot;</span></span><span> </span><span class="annot"><span class="annottext">Compiler
</span><a href="#local-6989586621679725034"><span class="hs-identifier hs-var">comp</span></a></span><span> </span><span class="annot"><span class="annottext">ProgramDb
</span><a href="#local-6989586621679725033"><span class="hs-identifier hs-var">progdb</span></a></span><span>
</span><span id="line-325"></span><span>    </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span id="local-6989586621679725030"><span class="annot"><span class="annottext">HcPkgInfo
</span><a href="#local-6989586621679725030"><span class="hs-identifier hs-var">hpi</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">HcPkgInfo -&gt; Verbosity -&gt; PackageDBStack -&gt; [String] -&gt; IO ()
</span><a href="Distribution.Simple.Program.HcPkg.html#invoke"><span class="hs-identifier hs-var">HcPkg.invoke</span></a></span><span> </span><span class="annot"><span class="annottext">HcPkgInfo
</span><a href="#local-6989586621679725030"><span class="hs-identifier hs-var">hpi</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679725035"><span class="hs-identifier hs-var">verbosity</span></a></span><span> </span><span class="annot"><span class="annottext">PackageDBStack
</span><a href="#local-6989586621679725032"><span class="hs-identifier hs-var">dbStack</span></a></span><span> </span><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679725031"><span class="hs-identifier hs-var">extraArgs</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-326"></span><span>
</span><span id="line-327"></span><span id="local-6989586621679725373"><span class="annot"><a href="Distribution.Simple.Register.html#withHcPkg"><span class="hs-identifier hs-type">withHcPkg</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Verbosity.html#Verbosity"><span class="hs-identifier hs-type">Verbosity</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.Compiler.html#Compiler"><span class="hs-identifier hs-type">Compiler</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.Program.Db.html#ProgramDb"><span class="hs-identifier hs-type">ProgramDb</span></a></span><span>
</span><span id="line-328"></span><span>          </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Simple.Program.HcPkg.html#HcPkgInfo"><span class="hs-identifier hs-type">HcPkg.HcPkgInfo</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="annot"><a href="#local-6989586621679725373"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="annot"><a href="#local-6989586621679725373"><span class="hs-identifier hs-type">a</span></a></span></span><span>
</span><span id="line-329"></span><span id="withHcPkg"><span class="annot"><span class="annottext">withHcPkg :: forall a.
Verbosity
-&gt; String -&gt; Compiler -&gt; ProgramDb -&gt; (HcPkgInfo -&gt; IO a) -&gt; IO a
</span><a href="Distribution.Simple.Register.html#withHcPkg"><span class="hs-identifier hs-var hs-var">withHcPkg</span></a></span></span><span> </span><span id="local-6989586621679725028"><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679725028"><span class="hs-identifier hs-var">verbosity</span></a></span></span><span> </span><span id="local-6989586621679725027"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725027"><span class="hs-identifier hs-var">name</span></a></span></span><span> </span><span id="local-6989586621679725026"><span class="annot"><span class="annottext">Compiler
</span><a href="#local-6989586621679725026"><span class="hs-identifier hs-var">comp</span></a></span></span><span> </span><span id="local-6989586621679725025"><span class="annot"><span class="annottext">ProgramDb
</span><a href="#local-6989586621679725025"><span class="hs-identifier hs-var">progdb</span></a></span></span><span> </span><span id="local-6989586621679725024"><span class="annot"><span class="annottext">HcPkgInfo -&gt; IO a
</span><a href="#local-6989586621679725024"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-330"></span><span>  </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Compiler -&gt; CompilerFlavor
</span><a href="Distribution.Simple.Compiler.html#compilerFlavor"><span class="hs-identifier hs-var">compilerFlavor</span></a></span><span> </span><span class="annot"><span class="annottext">Compiler
</span><a href="#local-6989586621679725026"><span class="hs-identifier hs-var">comp</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-331"></span><span>    </span><span class="annot"><span class="annottext">CompilerFlavor
</span><a href="Distribution.Compiler.html#GHC"><span class="hs-identifier hs-var">GHC</span></a></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">HcPkgInfo -&gt; IO a
</span><a href="#local-6989586621679725024"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ProgramDb -&gt; HcPkgInfo
</span><a href="Distribution.Simple.GHC.html#hcPkgInfo"><span class="hs-identifier hs-var">GHC.hcPkgInfo</span></a></span><span> </span><span class="annot"><span class="annottext">ProgramDb
</span><a href="#local-6989586621679725025"><span class="hs-identifier hs-var">progdb</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-332"></span><span>    </span><span class="annot"><span class="annottext">CompilerFlavor
</span><a href="Distribution.Compiler.html#GHCJS"><span class="hs-identifier hs-var">GHCJS</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">HcPkgInfo -&gt; IO a
</span><a href="#local-6989586621679725024"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ProgramDb -&gt; HcPkgInfo
</span><a href="Distribution.Simple.GHCJS.html#hcPkgInfo"><span class="hs-identifier hs-var">GHCJS.hcPkgInfo</span></a></span><span> </span><span class="annot"><span class="annottext">ProgramDb
</span><a href="#local-6989586621679725025"><span class="hs-identifier hs-var">progdb</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-333"></span><span>    </span><span class="annot"><span class="annottext">CompilerFlavor
</span><span class="hs-identifier">_</span></span><span>     </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Verbosity -&gt; String -&gt; IO a
forall a. Verbosity -&gt; String -&gt; IO a
</span><a href="Distribution.Simple.Utils.html#die%27"><span class="hs-identifier hs-var">die'</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679725028"><span class="hs-identifier hs-var">verbosity</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Distribution.Simple.Register.&quot;</span></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725027"><span class="hs-identifier hs-var">name</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;:\
                  \not implemented for this compiler&quot;</span></span><span class="hs-special">)</span><span>
</span><span id="line-335"></span><span>
</span><span id="line-336"></span><span class="annot"><a href="Distribution.Simple.Register.html#registerPackage"><span class="hs-identifier hs-type">registerPackage</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Verbosity.html#Verbosity"><span class="hs-identifier hs-type">Verbosity</span></a></span><span>
</span><span id="line-337"></span><span>                </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.Compiler.html#Compiler"><span class="hs-identifier hs-type">Compiler</span></a></span><span>
</span><span id="line-338"></span><span>                </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.Program.Db.html#ProgramDb"><span class="hs-identifier hs-type">ProgramDb</span></a></span><span>
</span><span id="line-339"></span><span>                </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.Compiler.html#PackageDBStack"><span class="hs-identifier hs-type">PackageDBStack</span></a></span><span>
</span><span id="line-340"></span><span>                </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.InstalledPackageInfo.html#InstalledPackageInfo"><span class="hs-identifier hs-type">InstalledPackageInfo</span></a></span><span>
</span><span id="line-341"></span><span>                </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.Program.HcPkg.html#RegisterOptions"><span class="hs-identifier hs-type">HcPkg.RegisterOptions</span></a></span><span>
</span><span id="line-342"></span><span>                </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-343"></span><span id="registerPackage"><span class="annot"><span class="annottext">registerPackage :: Verbosity
-&gt; Compiler
-&gt; ProgramDb
-&gt; PackageDBStack
-&gt; InstalledPackageInfo
-&gt; RegisterOptions
-&gt; IO ()
</span><a href="Distribution.Simple.Register.html#registerPackage"><span class="hs-identifier hs-var hs-var">registerPackage</span></a></span></span><span> </span><span id="local-6989586621679725023"><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679725023"><span class="hs-identifier hs-var">verbosity</span></a></span></span><span> </span><span id="local-6989586621679725022"><span class="annot"><span class="annottext">Compiler
</span><a href="#local-6989586621679725022"><span class="hs-identifier hs-var">comp</span></a></span></span><span> </span><span id="local-6989586621679725021"><span class="annot"><span class="annottext">ProgramDb
</span><a href="#local-6989586621679725021"><span class="hs-identifier hs-var">progdb</span></a></span></span><span> </span><span id="local-6989586621679725020"><span class="annot"><span class="annottext">PackageDBStack
</span><a href="#local-6989586621679725020"><span class="hs-identifier hs-var">packageDbs</span></a></span></span><span> </span><span id="local-6989586621679725019"><span class="annot"><span class="annottext">InstalledPackageInfo
</span><a href="#local-6989586621679725019"><span class="hs-identifier hs-var">installedPkgInfo</span></a></span></span><span> </span><span id="local-6989586621679725018"><span class="annot"><span class="annottext">RegisterOptions
</span><a href="#local-6989586621679725018"><span class="hs-identifier hs-var">registerOptions</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-344"></span><span>  </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Compiler -&gt; CompilerFlavor
</span><a href="Distribution.Simple.Compiler.html#compilerFlavor"><span class="hs-identifier hs-var">compilerFlavor</span></a></span><span> </span><span class="annot"><span class="annottext">Compiler
</span><a href="#local-6989586621679725022"><span class="hs-identifier hs-var">comp</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-345"></span><span>    </span><span class="annot"><span class="annottext">CompilerFlavor
</span><a href="Distribution.Compiler.html#GHC"><span class="hs-identifier hs-var">GHC</span></a></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Verbosity
-&gt; ProgramDb
-&gt; PackageDBStack
-&gt; InstalledPackageInfo
-&gt; RegisterOptions
-&gt; IO ()
</span><a href="Distribution.Simple.GHC.html#registerPackage"><span class="hs-identifier hs-var">GHC.registerPackage</span></a></span><span>   </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679725023"><span class="hs-identifier hs-var">verbosity</span></a></span><span> </span><span class="annot"><span class="annottext">ProgramDb
</span><a href="#local-6989586621679725021"><span class="hs-identifier hs-var">progdb</span></a></span><span> </span><span class="annot"><span class="annottext">PackageDBStack
</span><a href="#local-6989586621679725020"><span class="hs-identifier hs-var">packageDbs</span></a></span><span> </span><span class="annot"><span class="annottext">InstalledPackageInfo
</span><a href="#local-6989586621679725019"><span class="hs-identifier hs-var">installedPkgInfo</span></a></span><span> </span><span class="annot"><span class="annottext">RegisterOptions
</span><a href="#local-6989586621679725018"><span class="hs-identifier hs-var">registerOptions</span></a></span><span>
</span><span id="line-346"></span><span>    </span><span class="annot"><span class="annottext">CompilerFlavor
</span><a href="Distribution.Compiler.html#GHCJS"><span class="hs-identifier hs-var">GHCJS</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Verbosity
-&gt; ProgramDb
-&gt; PackageDBStack
-&gt; InstalledPackageInfo
-&gt; RegisterOptions
-&gt; IO ()
</span><a href="Distribution.Simple.GHCJS.html#registerPackage"><span class="hs-identifier hs-var">GHCJS.registerPackage</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679725023"><span class="hs-identifier hs-var">verbosity</span></a></span><span> </span><span class="annot"><span class="annottext">ProgramDb
</span><a href="#local-6989586621679725021"><span class="hs-identifier hs-var">progdb</span></a></span><span> </span><span class="annot"><span class="annottext">PackageDBStack
</span><a href="#local-6989586621679725020"><span class="hs-identifier hs-var">packageDbs</span></a></span><span> </span><span class="annot"><span class="annottext">InstalledPackageInfo
</span><a href="#local-6989586621679725019"><span class="hs-identifier hs-var">installedPkgInfo</span></a></span><span> </span><span class="annot"><span class="annottext">RegisterOptions
</span><a href="#local-6989586621679725018"><span class="hs-identifier hs-var">registerOptions</span></a></span><span>
</span><span id="line-347"></span><span>    </span><span class="annot"><a href="Distribution.Compiler.html#HaskellSuite"><span class="hs-identifier hs-type">HaskellSuite</span></a></span><span> </span><span class="hs-special">{</span><span class="hs-special">}</span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-348"></span><span>      </span><span class="annot"><span class="annottext">Verbosity
-&gt; ProgramDb -&gt; PackageDBStack -&gt; InstalledPackageInfo -&gt; IO ()
</span><a href="Distribution.Simple.HaskellSuite.html#registerPackage"><span class="hs-identifier hs-var">HaskellSuite.registerPackage</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679725023"><span class="hs-identifier hs-var">verbosity</span></a></span><span>      </span><span class="annot"><span class="annottext">ProgramDb
</span><a href="#local-6989586621679725021"><span class="hs-identifier hs-var">progdb</span></a></span><span> </span><span class="annot"><span class="annottext">PackageDBStack
</span><a href="#local-6989586621679725020"><span class="hs-identifier hs-var">packageDbs</span></a></span><span> </span><span class="annot"><span class="annottext">InstalledPackageInfo
</span><a href="#local-6989586621679725019"><span class="hs-identifier hs-var">installedPkgInfo</span></a></span><span>
</span><span id="line-349"></span><span>    </span><span class="annot"><span class="annottext">CompilerFlavor
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">RegisterOptions -&gt; Bool
</span><a href="Distribution.Simple.Program.HcPkg.html#registerMultiInstance"><span class="hs-identifier hs-var hs-var">HcPkg.registerMultiInstance</span></a></span><span> </span><span class="annot"><span class="annottext">RegisterOptions
</span><a href="#local-6989586621679725018"><span class="hs-identifier hs-var">registerOptions</span></a></span><span>
</span><span id="line-350"></span><span>          </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Verbosity -&gt; String -&gt; IO ()
forall a. Verbosity -&gt; String -&gt; IO a
</span><a href="Distribution.Simple.Utils.html#die%27"><span class="hs-identifier hs-var">die'</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679725023"><span class="hs-identifier hs-var">verbosity</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Registering multiple package instances is not yet supported for this compiler&quot;</span></span><span>
</span><span id="line-351"></span><span>    </span><span class="annot"><span class="annottext">CompilerFlavor
</span><a href="Distribution.Compiler.html#UHC"><span class="hs-identifier hs-var">UHC</span></a></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Verbosity
-&gt; Compiler
-&gt; ProgramDb
-&gt; PackageDBStack
-&gt; InstalledPackageInfo
-&gt; IO ()
</span><a href="Distribution.Simple.UHC.html#registerPackage"><span class="hs-identifier hs-var">UHC.registerPackage</span></a></span><span>   </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679725023"><span class="hs-identifier hs-var">verbosity</span></a></span><span> </span><span class="annot"><span class="annottext">Compiler
</span><a href="#local-6989586621679725022"><span class="hs-identifier hs-var">comp</span></a></span><span> </span><span class="annot"><span class="annottext">ProgramDb
</span><a href="#local-6989586621679725021"><span class="hs-identifier hs-var">progdb</span></a></span><span> </span><span class="annot"><span class="annottext">PackageDBStack
</span><a href="#local-6989586621679725020"><span class="hs-identifier hs-var">packageDbs</span></a></span><span> </span><span class="annot"><span class="annottext">InstalledPackageInfo
</span><a href="#local-6989586621679725019"><span class="hs-identifier hs-var">installedPkgInfo</span></a></span><span>
</span><span id="line-352"></span><span>    </span><span class="annot"><span class="annottext">CompilerFlavor
</span><span class="hs-identifier">_</span></span><span>    </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Verbosity -&gt; String -&gt; IO ()
forall a. Verbosity -&gt; String -&gt; IO a
</span><a href="Distribution.Simple.Utils.html#die%27"><span class="hs-identifier hs-var">die'</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679725023"><span class="hs-identifier hs-var">verbosity</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Registering is not implemented for this compiler&quot;</span></span><span>
</span><span id="line-353"></span><span>
</span><span id="line-354"></span><span class="annot"><a href="Distribution.Simple.Register.html#writeHcPkgRegisterScript"><span class="hs-identifier hs-type">writeHcPkgRegisterScript</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Verbosity.html#Verbosity"><span class="hs-identifier hs-type">Verbosity</span></a></span><span>
</span><span id="line-355"></span><span>                         </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="Distribution.Types.InstalledPackageInfo.html#InstalledPackageInfo"><span class="hs-identifier hs-type">InstalledPackageInfo</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-356"></span><span>                         </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.Compiler.html#PackageDBStack"><span class="hs-identifier hs-type">PackageDBStack</span></a></span><span>
</span><span id="line-357"></span><span>                         </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.Program.HcPkg.html#HcPkgInfo"><span class="hs-identifier hs-type">HcPkg.HcPkgInfo</span></a></span><span>
</span><span id="line-358"></span><span>                         </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-359"></span><span id="writeHcPkgRegisterScript"><span class="annot"><span class="annottext">writeHcPkgRegisterScript :: Verbosity
-&gt; [InstalledPackageInfo] -&gt; PackageDBStack -&gt; HcPkgInfo -&gt; IO ()
</span><a href="Distribution.Simple.Register.html#writeHcPkgRegisterScript"><span class="hs-identifier hs-var hs-var">writeHcPkgRegisterScript</span></a></span></span><span> </span><span id="local-6989586621679725012"><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679725012"><span class="hs-identifier hs-var">verbosity</span></a></span></span><span> </span><span id="local-6989586621679725011"><span class="annot"><span class="annottext">[InstalledPackageInfo]
</span><a href="#local-6989586621679725011"><span class="hs-identifier hs-var">ipis</span></a></span></span><span> </span><span id="local-6989586621679725010"><span class="annot"><span class="annottext">PackageDBStack
</span><a href="#local-6989586621679725010"><span class="hs-identifier hs-var">packageDbs</span></a></span></span><span> </span><span id="local-6989586621679725009"><span class="annot"><span class="annottext">HcPkgInfo
</span><a href="#local-6989586621679725009"><span class="hs-identifier hs-var">hpi</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-360"></span><span>  </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621679725008"><span class="annot"><span class="annottext">genScript :: InstalledPackageInfo -&gt; String
</span><a href="#local-6989586621679725008"><span class="hs-identifier hs-var hs-var">genScript</span></a></span></span><span> </span><span id="local-6989586621679725007"><span class="annot"><span class="annottext">InstalledPackageInfo
</span><a href="#local-6989586621679725007"><span class="hs-identifier hs-var">installedPkgInfo</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-361"></span><span>          </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621679725006"><span class="annot"><span class="annottext">invocation :: ProgramInvocation
</span><a href="#local-6989586621679725006"><span class="hs-identifier hs-var hs-var">invocation</span></a></span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">HcPkgInfo
-&gt; Verbosity
-&gt; PackageDBStack
-&gt; InstalledPackageInfo
-&gt; RegisterOptions
-&gt; ProgramInvocation
</span><a href="Distribution.Simple.Program.HcPkg.html#registerInvocation"><span class="hs-identifier hs-var">HcPkg.registerInvocation</span></a></span><span> </span><span class="annot"><span class="annottext">HcPkgInfo
</span><a href="#local-6989586621679725009"><span class="hs-identifier hs-var">hpi</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="Distribution.Verbosity.html#normal"><span class="hs-identifier hs-var">Verbosity.normal</span></a></span><span>
</span><span id="line-362"></span><span>                              </span><span class="annot"><span class="annottext">PackageDBStack
</span><a href="#local-6989586621679725010"><span class="hs-identifier hs-var">packageDbs</span></a></span><span> </span><span class="annot"><span class="annottext">InstalledPackageInfo
</span><a href="#local-6989586621679725007"><span class="hs-identifier hs-var">installedPkgInfo</span></a></span><span>
</span><span id="line-363"></span><span>                              </span><span class="annot"><span class="annottext">RegisterOptions
</span><a href="Distribution.Simple.Program.HcPkg.html#defaultRegisterOptions"><span class="hs-identifier hs-var">HcPkg.defaultRegisterOptions</span></a></span><span>
</span><span id="line-364"></span><span>          </span><span class="hs-keyword">in</span><span> </span><span class="annot"><span class="annottext">OS -&gt; ProgramInvocation -&gt; String
</span><a href="Distribution.Simple.Program.Script.html#invocationAsSystemScript"><span class="hs-identifier hs-var">invocationAsSystemScript</span></a></span><span> </span><span class="annot"><span class="annottext">OS
</span><a href="Distribution.System.html#buildOS"><span class="hs-identifier hs-var">buildOS</span></a></span><span> </span><span class="annot"><span class="annottext">ProgramInvocation
</span><a href="#local-6989586621679725006"><span class="hs-identifier hs-var">invocation</span></a></span><span>
</span><span id="line-365"></span><span>      </span><span id="local-6989586621679725001"><span class="annot"><span class="annottext">scripts :: [String]
</span><a href="#local-6989586621679725001"><span class="hs-identifier hs-var hs-var">scripts</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(InstalledPackageInfo -&gt; String)
-&gt; [InstalledPackageInfo] -&gt; [String]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">InstalledPackageInfo -&gt; String
</span><a href="#local-6989586621679725008"><span class="hs-identifier hs-var">genScript</span></a></span><span> </span><span class="annot"><span class="annottext">[InstalledPackageInfo]
</span><a href="#local-6989586621679725011"><span class="hs-identifier hs-var">ipis</span></a></span><span>
</span><span id="line-366"></span><span>      </span><span class="hs-comment">-- TODO: Do something more robust here</span><span>
</span><span id="line-367"></span><span>      </span><span id="local-6989586621679725000"><span class="annot"><span class="annottext">regScript :: String
</span><a href="#local-6989586621679725000"><span class="hs-identifier hs-var hs-var">regScript</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[String] -&gt; String
</span><a href="../../base/src/Data.OldList.html#unlines"><span class="hs-identifier hs-var">unlines</span></a></span><span> </span><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679725001"><span class="hs-identifier hs-var">scripts</span></a></span><span>
</span><span id="line-368"></span><span>
</span><span id="line-369"></span><span>  </span><span class="annot"><span class="annottext">Verbosity -&gt; String -&gt; IO ()
</span><a href="Distribution.Simple.Utils.html#info"><span class="hs-identifier hs-var">info</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679725012"><span class="hs-identifier hs-var">verbosity</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Creating package registration script: &quot;</span></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="Distribution.Simple.Register.html#regScriptFileName"><span class="hs-identifier hs-var">regScriptFileName</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-370"></span><span>  </span><span class="annot"><span class="annottext">String -&gt; String -&gt; IO ()
</span><a href="Distribution.Utils.Generic.html#writeUTF8File"><span class="hs-identifier hs-var">writeUTF8File</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="Distribution.Simple.Register.html#regScriptFileName"><span class="hs-identifier hs-var">regScriptFileName</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725000"><span class="hs-identifier hs-var">regScript</span></a></span><span>
</span><span id="line-371"></span><span>  </span><span class="annot"><span class="annottext">String -&gt; IO ()
</span><a href="Distribution.Compat.CopyFile.html#setFileExecutable"><span class="hs-identifier hs-var">setFileExecutable</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="Distribution.Simple.Register.html#regScriptFileName"><span class="hs-identifier hs-var">regScriptFileName</span></a></span><span>
</span><span id="line-372"></span><span>
</span><span id="line-373"></span><span class="annot"><a href="Distribution.Simple.Register.html#regScriptFileName"><span class="hs-identifier hs-type">regScriptFileName</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.IO.html#FilePath"><span class="hs-identifier hs-type">FilePath</span></a></span><span>
</span><span id="line-374"></span><span id="regScriptFileName"><span class="annot"><span class="annottext">regScriptFileName :: String
</span><a href="Distribution.Simple.Register.html#regScriptFileName"><span class="hs-identifier hs-var hs-var">regScriptFileName</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">OS
</span><a href="Distribution.System.html#buildOS"><span class="hs-identifier hs-var">buildOS</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-375"></span><span>                        </span><span class="annot"><span class="annottext">OS
</span><a href="Distribution.System.html#Windows"><span class="hs-identifier hs-var">Windows</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;register.bat&quot;</span></span><span>
</span><span id="line-376"></span><span>                        </span><span class="annot"><span class="annottext">OS
</span><span class="hs-identifier">_</span></span><span>       </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;register.sh&quot;</span></span><span>
</span><span id="line-377"></span><span>
</span><span id="line-378"></span><span>
</span><span id="line-379"></span><span class="hs-comment">-- -----------------------------------------------------------------------------</span><span>
</span><span id="line-380"></span><span class="hs-comment">-- Making the InstalledPackageInfo</span><span>
</span><span id="line-381"></span><span>
</span><span id="line-382"></span><span class="hs-comment">-- | Construct 'InstalledPackageInfo' for a library in a package, given a set</span><span>
</span><span id="line-383"></span><span class="hs-comment">-- of installation directories.</span><span>
</span><span id="line-384"></span><span class="hs-comment">--</span><span>
</span><span id="line-385"></span><span class="annot"><a href="Distribution.Simple.Register.html#generalInstalledPackageInfo"><span class="hs-identifier hs-type">generalInstalledPackageInfo</span></a></span><span>
</span><span id="line-386"></span><span>  </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="hs-special">[</span><span class="annot"><a href="../../base/src/GHC.IO.html#FilePath"><span class="hs-identifier hs-type">FilePath</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="../../base/src/GHC.IO.html#FilePath"><span class="hs-identifier hs-type">FilePath</span></a></span><span class="hs-special">]</span><span class="hs-special">)</span><span> </span><span class="hs-comment">-- ^ Translate relative include dir paths to</span><span>
</span><span id="line-387"></span><span>                                </span><span class="hs-comment">-- absolute paths.</span><span>
</span><span id="line-388"></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.PackageDescription.html#PackageDescription"><span class="hs-identifier hs-type">PackageDescription</span></a></span><span>
</span><span id="line-389"></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.AbiHash.html#AbiHash"><span class="hs-identifier hs-type">AbiHash</span></a></span><span>
</span><span id="line-390"></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.Library.html#Library"><span class="hs-identifier hs-type">Library</span></a></span><span>
</span><span id="line-391"></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.LocalBuildInfo.html#LocalBuildInfo"><span class="hs-identifier hs-type">LocalBuildInfo</span></a></span><span>
</span><span id="line-392"></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.ComponentLocalBuildInfo.html#ComponentLocalBuildInfo"><span class="hs-identifier hs-type">ComponentLocalBuildInfo</span></a></span><span>
</span><span id="line-393"></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.InstallDirs.html#InstallDirs"><span class="hs-identifier hs-type">InstallDirs</span></a></span><span> </span><span class="annot"><a href="../../base/src/GHC.IO.html#FilePath"><span class="hs-identifier hs-type">FilePath</span></a></span><span>
</span><span id="line-394"></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.InstalledPackageInfo.html#InstalledPackageInfo"><span class="hs-identifier hs-type">InstalledPackageInfo</span></a></span><span>
</span><span id="line-395"></span><span id="generalInstalledPackageInfo"><span class="annot"><span class="annottext">generalInstalledPackageInfo :: ([String] -&gt; [String])
-&gt; PackageDescription
-&gt; AbiHash
-&gt; Library
-&gt; LocalBuildInfo
-&gt; ComponentLocalBuildInfo
-&gt; InstallDirs String
-&gt; InstalledPackageInfo
</span><a href="Distribution.Simple.Register.html#generalInstalledPackageInfo"><span class="hs-identifier hs-var hs-var">generalInstalledPackageInfo</span></a></span></span><span> </span><span id="local-6989586621679724995"><span class="annot"><span class="annottext">[String] -&gt; [String]
</span><a href="#local-6989586621679724995"><span class="hs-identifier hs-var">adjustRelIncDirs</span></a></span></span><span> </span><span id="local-6989586621679724994"><span class="annot"><span class="annottext">PackageDescription
</span><a href="#local-6989586621679724994"><span class="hs-identifier hs-var">pkg</span></a></span></span><span> </span><span id="local-6989586621679724993"><span class="annot"><span class="annottext">AbiHash
</span><a href="#local-6989586621679724993"><span class="hs-identifier hs-var">abi_hash</span></a></span></span><span> </span><span id="local-6989586621679724992"><span class="annot"><span class="annottext">Library
</span><a href="#local-6989586621679724992"><span class="hs-identifier hs-var">lib</span></a></span></span><span> </span><span id="local-6989586621679724991"><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679724991"><span class="hs-identifier hs-var">lbi</span></a></span></span><span> </span><span id="local-6989586621679724990"><span class="annot"><span class="annottext">ComponentLocalBuildInfo
</span><a href="#local-6989586621679724990"><span class="hs-identifier hs-var">clbi</span></a></span></span><span> </span><span id="local-6989586621679724989"><span class="annot"><span class="annottext">InstallDirs String
</span><a href="#local-6989586621679724989"><span class="hs-identifier hs-var">installDirs</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-396"></span><span>  </span><span class="annot"><span class="annottext">InstalledPackageInfo :: PackageIdentifier
-&gt; LibraryName
-&gt; ComponentId
-&gt; LibraryVisibility
-&gt; UnitId
-&gt; [(ModuleName, OpenModule)]
-&gt; String
-&gt; Either License License
-&gt; ShortText
-&gt; ShortText
-&gt; ShortText
-&gt; ShortText
-&gt; ShortText
-&gt; ShortText
-&gt; ShortText
-&gt; ShortText
-&gt; ShortText
-&gt; AbiHash
-&gt; Bool
-&gt; Bool
-&gt; [ExposedModule]
-&gt; [ModuleName]
-&gt; Bool
-&gt; [String]
-&gt; [String]
-&gt; [String]
-&gt; String
-&gt; [String]
-&gt; [String]
-&gt; [String]
-&gt; [String]
-&gt; [String]
-&gt; [UnitId]
-&gt; [AbiDependency]
-&gt; [String]
-&gt; [String]
-&gt; [String]
-&gt; [String]
-&gt; [String]
-&gt; [String]
-&gt; [String]
-&gt; Maybe String
-&gt; InstalledPackageInfo
</span><a href="Distribution.Types.InstalledPackageInfo.html#InstalledPackageInfo"><span class="hs-identifier hs-type">IPI.InstalledPackageInfo</span></a></span><span> </span><span class="hs-special">{</span><span>
</span><span id="line-397"></span><span>    </span><span class="annot"><span class="annottext">sourcePackageId :: PackageIdentifier
</span><a href="Distribution.Types.InstalledPackageInfo.html#sourcePackageId"><span class="hs-identifier hs-var">IPI.sourcePackageId</span></a></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">PackageDescription -&gt; PackageIdentifier
forall pkg. Package pkg =&gt; pkg -&gt; PackageIdentifier
</span><a href="Distribution.Package.html#packageId"><span class="hs-identifier hs-var">packageId</span></a></span><span> </span><span class="annot"><span class="annottext">PackageDescription
</span><a href="#local-6989586621679724994"><span class="hs-identifier hs-var">pkg</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-398"></span><span>    </span><span class="annot"><span class="annottext">installedUnitId :: UnitId
</span><a href="Distribution.Types.InstalledPackageInfo.html#installedUnitId"><span class="hs-identifier hs-var">IPI.installedUnitId</span></a></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ComponentLocalBuildInfo -&gt; UnitId
</span><a href="Distribution.Types.ComponentLocalBuildInfo.html#componentUnitId"><span class="hs-identifier hs-var hs-var">componentUnitId</span></a></span><span> </span><span class="annot"><span class="annottext">ComponentLocalBuildInfo
</span><a href="#local-6989586621679724990"><span class="hs-identifier hs-var">clbi</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-399"></span><span>    </span><span class="annot"><span class="annottext">installedComponentId_ :: ComponentId
</span><a href="Distribution.Types.InstalledPackageInfo.html#installedComponentId_"><span class="hs-identifier hs-var">IPI.installedComponentId_</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ComponentLocalBuildInfo -&gt; ComponentId
</span><a href="Distribution.Types.ComponentLocalBuildInfo.html#componentComponentId"><span class="hs-identifier hs-var hs-var">componentComponentId</span></a></span><span> </span><span class="annot"><span class="annottext">ComponentLocalBuildInfo
</span><a href="#local-6989586621679724990"><span class="hs-identifier hs-var">clbi</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-400"></span><span>    </span><span class="annot"><span class="annottext">instantiatedWith :: [(ModuleName, OpenModule)]
</span><a href="Distribution.Types.InstalledPackageInfo.html#instantiatedWith"><span class="hs-identifier hs-var">IPI.instantiatedWith</span></a></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ComponentLocalBuildInfo -&gt; [(ModuleName, OpenModule)]
</span><a href="Distribution.Types.ComponentLocalBuildInfo.html#componentInstantiatedWith"><span class="hs-identifier hs-var hs-var">componentInstantiatedWith</span></a></span><span> </span><span class="annot"><span class="annottext">ComponentLocalBuildInfo
</span><a href="#local-6989586621679724990"><span class="hs-identifier hs-var">clbi</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-401"></span><span>    </span><span class="annot"><span class="annottext">sourceLibName :: LibraryName
</span><a href="Distribution.Types.InstalledPackageInfo.html#sourceLibName"><span class="hs-identifier hs-var">IPI.sourceLibName</span></a></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Library -&gt; LibraryName
</span><a href="Distribution.Types.Library.html#libName"><span class="hs-identifier hs-var hs-var">libName</span></a></span><span> </span><span class="annot"><span class="annottext">Library
</span><a href="#local-6989586621679724992"><span class="hs-identifier hs-var">lib</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-402"></span><span>    </span><span class="annot"><span class="annottext">compatPackageKey :: String
</span><a href="Distribution.Types.InstalledPackageInfo.html#compatPackageKey"><span class="hs-identifier hs-var">IPI.compatPackageKey</span></a></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ComponentLocalBuildInfo -&gt; String
</span><a href="Distribution.Types.ComponentLocalBuildInfo.html#componentCompatPackageKey"><span class="hs-identifier hs-var hs-var">componentCompatPackageKey</span></a></span><span> </span><span class="annot"><span class="annottext">ComponentLocalBuildInfo
</span><a href="#local-6989586621679724990"><span class="hs-identifier hs-var">clbi</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-403"></span><span>    </span><span class="hs-comment">-- If GHC &gt;= 8.4 we register with SDPX, otherwise with legacy license</span><span>
</span><span id="line-404"></span><span>    </span><span class="annot"><span class="annottext">license :: Either License License
</span><a href="Distribution.Types.InstalledPackageInfo.html#license"><span class="hs-identifier hs-var">IPI.license</span></a></span><span>            </span><span class="hs-glyph">=</span><span>
</span><span id="line-405"></span><span>        </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679724978"><span class="hs-identifier hs-var">ghc84</span></a></span><span>
</span><span id="line-406"></span><span>        </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">License -&gt; Either License License
forall a b. a -&gt; Either a b
</span><a href="../../base/src/Data.Either.html#Left"><span class="hs-identifier hs-var">Left</span></a></span><span> </span><span class="annot"><span class="annottext">(License -&gt; Either License License)
-&gt; License -&gt; Either License License
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">(License -&gt; License)
-&gt; (License -&gt; License) -&gt; Either License License -&gt; License
forall a c b. (a -&gt; c) -&gt; (b -&gt; c) -&gt; Either a b -&gt; c
</span><a href="../../base/src/Data.Either.html#either"><span class="hs-identifier hs-var">either</span></a></span><span> </span><span class="annot"><span class="annottext">License -&gt; License
forall a. a -&gt; a
</span><a href="../../base/src/GHC.Base.html#id"><span class="hs-identifier hs-var">id</span></a></span><span> </span><span class="annot"><span class="annottext">License -&gt; License
</span><a href="Distribution.License.html#licenseToSPDX"><span class="hs-identifier hs-var">licenseToSPDX</span></a></span><span> </span><span class="annot"><span class="annottext">(Either License License -&gt; License)
-&gt; Either License License -&gt; License
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">PackageDescription -&gt; Either License License
</span><a href="Distribution.Types.PackageDescription.html#licenseRaw"><span class="hs-identifier hs-var hs-var">licenseRaw</span></a></span><span> </span><span class="annot"><span class="annottext">PackageDescription
</span><a href="#local-6989586621679724994"><span class="hs-identifier hs-var">pkg</span></a></span><span>
</span><span id="line-407"></span><span>        </span><span class="hs-keyword">else</span><span> </span><span class="annot"><span class="annottext">License -&gt; Either License License
forall a b. b -&gt; Either a b
</span><a href="../../base/src/Data.Either.html#Right"><span class="hs-identifier hs-var">Right</span></a></span><span> </span><span class="annot"><span class="annottext">(License -&gt; Either License License)
-&gt; License -&gt; Either License License
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">(License -&gt; License)
-&gt; (License -&gt; License) -&gt; Either License License -&gt; License
forall a c b. (a -&gt; c) -&gt; (b -&gt; c) -&gt; Either a b -&gt; c
</span><a href="../../base/src/Data.Either.html#either"><span class="hs-identifier hs-var">either</span></a></span><span> </span><span class="annot"><span class="annottext">License -&gt; License
</span><a href="Distribution.License.html#licenseFromSPDX"><span class="hs-identifier hs-var">licenseFromSPDX</span></a></span><span> </span><span class="annot"><span class="annottext">License -&gt; License
forall a. a -&gt; a
</span><a href="../../base/src/GHC.Base.html#id"><span class="hs-identifier hs-var">id</span></a></span><span> </span><span class="annot"><span class="annottext">(Either License License -&gt; License)
-&gt; Either License License -&gt; License
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">PackageDescription -&gt; Either License License
</span><a href="Distribution.Types.PackageDescription.html#licenseRaw"><span class="hs-identifier hs-var hs-var">licenseRaw</span></a></span><span> </span><span class="annot"><span class="annottext">PackageDescription
</span><a href="#local-6989586621679724994"><span class="hs-identifier hs-var">pkg</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-408"></span><span>    </span><span class="annot"><span class="annottext">copyright :: ShortText
</span><a href="Distribution.Types.InstalledPackageInfo.html#copyright"><span class="hs-identifier hs-var">IPI.copyright</span></a></span><span>          </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">PackageDescription -&gt; ShortText
</span><a href="Distribution.Types.PackageDescription.html#copyright"><span class="hs-identifier hs-var hs-var">copyright</span></a></span><span>   </span><span class="annot"><span class="annottext">PackageDescription
</span><a href="#local-6989586621679724994"><span class="hs-identifier hs-var">pkg</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-409"></span><span>    </span><span class="annot"><span class="annottext">maintainer :: ShortText
</span><a href="Distribution.Types.InstalledPackageInfo.html#maintainer"><span class="hs-identifier hs-var">IPI.maintainer</span></a></span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">PackageDescription -&gt; ShortText
</span><a href="Distribution.Types.PackageDescription.html#maintainer"><span class="hs-identifier hs-var hs-var">maintainer</span></a></span><span>  </span><span class="annot"><span class="annottext">PackageDescription
</span><a href="#local-6989586621679724994"><span class="hs-identifier hs-var">pkg</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-410"></span><span>    </span><span class="annot"><span class="annottext">author :: ShortText
</span><a href="Distribution.Types.InstalledPackageInfo.html#author"><span class="hs-identifier hs-var">IPI.author</span></a></span><span>             </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">PackageDescription -&gt; ShortText
</span><a href="Distribution.Types.PackageDescription.html#author"><span class="hs-identifier hs-var hs-var">author</span></a></span><span>      </span><span class="annot"><span class="annottext">PackageDescription
</span><a href="#local-6989586621679724994"><span class="hs-identifier hs-var">pkg</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-411"></span><span>    </span><span class="annot"><span class="annottext">stability :: ShortText
</span><a href="Distribution.Types.InstalledPackageInfo.html#stability"><span class="hs-identifier hs-var">IPI.stability</span></a></span><span>          </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">PackageDescription -&gt; ShortText
</span><a href="Distribution.Types.PackageDescription.html#stability"><span class="hs-identifier hs-var hs-var">stability</span></a></span><span>   </span><span class="annot"><span class="annottext">PackageDescription
</span><a href="#local-6989586621679724994"><span class="hs-identifier hs-var">pkg</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-412"></span><span>    </span><span class="annot"><span class="annottext">homepage :: ShortText
</span><a href="Distribution.Types.InstalledPackageInfo.html#homepage"><span class="hs-identifier hs-var">IPI.homepage</span></a></span><span>           </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">PackageDescription -&gt; ShortText
</span><a href="Distribution.Types.PackageDescription.html#homepage"><span class="hs-identifier hs-var hs-var">homepage</span></a></span><span>    </span><span class="annot"><span class="annottext">PackageDescription
</span><a href="#local-6989586621679724994"><span class="hs-identifier hs-var">pkg</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-413"></span><span>    </span><span class="annot"><span class="annottext">pkgUrl :: ShortText
</span><a href="Distribution.Types.InstalledPackageInfo.html#pkgUrl"><span class="hs-identifier hs-var">IPI.pkgUrl</span></a></span><span>             </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">PackageDescription -&gt; ShortText
</span><a href="Distribution.Types.PackageDescription.html#pkgUrl"><span class="hs-identifier hs-var hs-var">pkgUrl</span></a></span><span>      </span><span class="annot"><span class="annottext">PackageDescription
</span><a href="#local-6989586621679724994"><span class="hs-identifier hs-var">pkg</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-414"></span><span>    </span><span class="annot"><span class="annottext">synopsis :: ShortText
</span><a href="Distribution.Types.InstalledPackageInfo.html#synopsis"><span class="hs-identifier hs-var">IPI.synopsis</span></a></span><span>           </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">PackageDescription -&gt; ShortText
</span><a href="Distribution.Types.PackageDescription.html#synopsis"><span class="hs-identifier hs-var hs-var">synopsis</span></a></span><span>    </span><span class="annot"><span class="annottext">PackageDescription
</span><a href="#local-6989586621679724994"><span class="hs-identifier hs-var">pkg</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-415"></span><span>    </span><span class="annot"><span class="annottext">description :: ShortText
</span><a href="Distribution.Types.InstalledPackageInfo.html#description"><span class="hs-identifier hs-var">IPI.description</span></a></span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">PackageDescription -&gt; ShortText
</span><a href="Distribution.Types.PackageDescription.html#description"><span class="hs-identifier hs-var hs-var">description</span></a></span><span> </span><span class="annot"><span class="annottext">PackageDescription
</span><a href="#local-6989586621679724994"><span class="hs-identifier hs-var">pkg</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-416"></span><span>    </span><span class="annot"><span class="annottext">category :: ShortText
</span><a href="Distribution.Types.InstalledPackageInfo.html#category"><span class="hs-identifier hs-var">IPI.category</span></a></span><span>           </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">PackageDescription -&gt; ShortText
</span><a href="Distribution.Types.PackageDescription.html#category"><span class="hs-identifier hs-var hs-var">category</span></a></span><span>    </span><span class="annot"><span class="annottext">PackageDescription
</span><a href="#local-6989586621679724994"><span class="hs-identifier hs-var">pkg</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-417"></span><span>    </span><span class="annot"><span class="annottext">abiHash :: AbiHash
</span><a href="Distribution.Types.InstalledPackageInfo.html#abiHash"><span class="hs-identifier hs-var">IPI.abiHash</span></a></span><span>            </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">AbiHash
</span><a href="#local-6989586621679724993"><span class="hs-identifier hs-var">abi_hash</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-418"></span><span>    </span><span class="annot"><span class="annottext">indefinite :: Bool
</span><a href="Distribution.Types.InstalledPackageInfo.html#indefinite"><span class="hs-identifier hs-var">IPI.indefinite</span></a></span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ComponentLocalBuildInfo -&gt; Bool
</span><a href="Distribution.Types.ComponentLocalBuildInfo.html#componentIsIndefinite"><span class="hs-identifier hs-var">componentIsIndefinite</span></a></span><span> </span><span class="annot"><span class="annottext">ComponentLocalBuildInfo
</span><a href="#local-6989586621679724990"><span class="hs-identifier hs-var">clbi</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-419"></span><span>    </span><span class="annot"><span class="annottext">exposed :: Bool
</span><a href="Distribution.Types.InstalledPackageInfo.html#exposed"><span class="hs-identifier hs-var">IPI.exposed</span></a></span><span>            </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Library -&gt; Bool
</span><a href="Distribution.Types.Library.html#libExposed"><span class="hs-identifier hs-var hs-var">libExposed</span></a></span><span>  </span><span class="annot"><span class="annottext">Library
</span><a href="#local-6989586621679724992"><span class="hs-identifier hs-var">lib</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-420"></span><span>    </span><span class="annot"><span class="annottext">exposedModules :: [ExposedModule]
</span><a href="Distribution.Types.InstalledPackageInfo.html#exposedModules"><span class="hs-identifier hs-var">IPI.exposedModules</span></a></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ComponentLocalBuildInfo -&gt; [ExposedModule]
</span><a href="Distribution.Types.ComponentLocalBuildInfo.html#componentExposedModules"><span class="hs-identifier hs-var hs-var">componentExposedModules</span></a></span><span> </span><span class="annot"><span class="annottext">ComponentLocalBuildInfo
</span><a href="#local-6989586621679724990"><span class="hs-identifier hs-var">clbi</span></a></span><span>
</span><span id="line-421"></span><span>                             </span><span class="hs-comment">-- add virtual modules into the list of exposed modules for the</span><span>
</span><span id="line-422"></span><span>                             </span><span class="hs-comment">-- package database as well.</span><span>
</span><span id="line-423"></span><span>                             </span><span class="annot"><span class="annottext">[ExposedModule] -&gt; [ExposedModule] -&gt; [ExposedModule]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">(ModuleName -&gt; ExposedModule) -&gt; [ModuleName] -&gt; [ExposedModule]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span id="local-6989586621679724949"><span class="annot"><span class="annottext">ModuleName
</span><a href="#local-6989586621679724949"><span class="hs-identifier hs-var">name</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">ModuleName -&gt; Maybe OpenModule -&gt; ExposedModule
</span><a href="Distribution.Types.ExposedModule.html#ExposedModule"><span class="hs-identifier hs-var">IPI.ExposedModule</span></a></span><span> </span><span class="annot"><span class="annottext">ModuleName
</span><a href="#local-6989586621679724949"><span class="hs-identifier hs-var">name</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe OpenModule
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">BuildInfo -&gt; [ModuleName]
</span><a href="Distribution.Types.BuildInfo.html#virtualModules"><span class="hs-identifier hs-var hs-var">virtualModules</span></a></span><span> </span><span class="annot"><span class="annottext">BuildInfo
</span><a href="#local-6989586621679724946"><span class="hs-identifier hs-var">bi</span></a></span><span class="hs-special">)</span><span class="hs-special">,</span><span>
</span><span id="line-424"></span><span>    </span><span class="annot"><span class="annottext">hiddenModules :: [ModuleName]
</span><a href="Distribution.Types.InstalledPackageInfo.html#hiddenModules"><span class="hs-identifier hs-var">IPI.hiddenModules</span></a></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">BuildInfo -&gt; [ModuleName]
</span><a href="Distribution.Types.BuildInfo.html#otherModules"><span class="hs-identifier hs-var hs-var">otherModules</span></a></span><span> </span><span class="annot"><span class="annottext">BuildInfo
</span><a href="#local-6989586621679724946"><span class="hs-identifier hs-var">bi</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-425"></span><span>    </span><span class="annot"><span class="annottext">trusted :: Bool
</span><a href="Distribution.Types.InstalledPackageInfo.html#trusted"><span class="hs-identifier hs-var">IPI.trusted</span></a></span><span>            </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">InstalledPackageInfo -&gt; Bool
</span><a href="Distribution.Types.InstalledPackageInfo.html#trusted"><span class="hs-identifier hs-var hs-var">IPI.trusted</span></a></span><span> </span><span class="annot"><span class="annottext">InstalledPackageInfo
</span><a href="Distribution.Types.InstalledPackageInfo.html#emptyInstalledPackageInfo"><span class="hs-identifier hs-var">IPI.emptyInstalledPackageInfo</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-426"></span><span>    </span><span class="annot"><span class="annottext">importDirs :: [String]
</span><a href="Distribution.Types.InstalledPackageInfo.html#importDirs"><span class="hs-identifier hs-var">IPI.importDirs</span></a></span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span> </span><span class="annot"><span class="annottext">InstallDirs String -&gt; String
forall dir. InstallDirs dir -&gt; dir
</span><a href="Distribution.Simple.InstallDirs.html#libdir"><span class="hs-identifier hs-var hs-var">libdir</span></a></span><span> </span><span class="annot"><span class="annottext">InstallDirs String
</span><a href="#local-6989586621679724989"><span class="hs-identifier hs-var">installDirs</span></a></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679724939"><span class="hs-identifier hs-var">hasModules</span></a></span><span> </span><span class="hs-special">]</span><span class="hs-special">,</span><span>
</span><span id="line-427"></span><span>    </span><span class="annot"><span class="annottext">libraryDirs :: [String]
</span><a href="Distribution.Types.InstalledPackageInfo.html#libraryDirs"><span class="hs-identifier hs-var">IPI.libraryDirs</span></a></span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679724937"><span class="hs-identifier hs-var">libdirs</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-428"></span><span>    </span><span class="annot"><span class="annottext">libraryDynDirs :: [String]
</span><a href="Distribution.Types.InstalledPackageInfo.html#libraryDynDirs"><span class="hs-identifier hs-var">IPI.libraryDynDirs</span></a></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679724935"><span class="hs-identifier hs-var">dynlibdirs</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-429"></span><span>    </span><span class="annot"><span class="annottext">dataDir :: String
</span><a href="Distribution.Types.InstalledPackageInfo.html#dataDir"><span class="hs-identifier hs-var">IPI.dataDir</span></a></span><span>            </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">InstallDirs String -&gt; String
forall dir. InstallDirs dir -&gt; dir
</span><a href="Distribution.Simple.InstallDirs.html#datadir"><span class="hs-identifier hs-var hs-var">datadir</span></a></span><span> </span><span class="annot"><span class="annottext">InstallDirs String
</span><a href="#local-6989586621679724989"><span class="hs-identifier hs-var">installDirs</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-430"></span><span>    </span><span class="annot"><span class="annottext">hsLibraries :: [String]
</span><a href="Distribution.Types.InstalledPackageInfo.html#hsLibraries"><span class="hs-identifier hs-var">IPI.hsLibraries</span></a></span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679724931"><span class="hs-identifier hs-var">hasLibrary</span></a></span><span>
</span><span id="line-431"></span><span>                              </span><span class="hs-keyword">then</span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">UnitId -&gt; String
</span><a href="Distribution.Types.UnitId.html#getHSLibraryName"><span class="hs-identifier hs-var">getHSLibraryName</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ComponentLocalBuildInfo -&gt; UnitId
</span><a href="Distribution.Types.ComponentLocalBuildInfo.html#componentUnitId"><span class="hs-identifier hs-var hs-var">componentUnitId</span></a></span><span> </span><span class="annot"><span class="annottext">ComponentLocalBuildInfo
</span><a href="#local-6989586621679724990"><span class="hs-identifier hs-var">clbi</span></a></span><span class="hs-special">)</span><span class="hs-special">]</span><span>
</span><span id="line-432"></span><span>                              </span><span class="hs-keyword">else</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[String] -&gt; [String] -&gt; [String]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">BuildInfo -&gt; [String]
</span><a href="Distribution.Types.BuildInfo.html#extraBundledLibs"><span class="hs-identifier hs-var hs-var">extraBundledLibs</span></a></span><span> </span><span class="annot"><span class="annottext">BuildInfo
</span><a href="#local-6989586621679724946"><span class="hs-identifier hs-var">bi</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-433"></span><span>    </span><span class="annot"><span class="annottext">extraLibraries :: [String]
</span><a href="Distribution.Types.InstalledPackageInfo.html#extraLibraries"><span class="hs-identifier hs-var">IPI.extraLibraries</span></a></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">BuildInfo -&gt; [String]
</span><a href="Distribution.Types.BuildInfo.html#extraLibs"><span class="hs-identifier hs-var hs-var">extraLibs</span></a></span><span> </span><span class="annot"><span class="annottext">BuildInfo
</span><a href="#local-6989586621679724946"><span class="hs-identifier hs-var">bi</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-434"></span><span>    </span><span class="annot"><span class="annottext">extraGHCiLibraries :: [String]
</span><a href="Distribution.Types.InstalledPackageInfo.html#extraGHCiLibraries"><span class="hs-identifier hs-var">IPI.extraGHCiLibraries</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">BuildInfo -&gt; [String]
</span><a href="Distribution.Types.BuildInfo.html#extraGHCiLibs"><span class="hs-identifier hs-var hs-var">extraGHCiLibs</span></a></span><span> </span><span class="annot"><span class="annottext">BuildInfo
</span><a href="#local-6989586621679724946"><span class="hs-identifier hs-var">bi</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-435"></span><span>    </span><span class="annot"><span class="annottext">includeDirs :: [String]
</span><a href="Distribution.Types.InstalledPackageInfo.html#includeDirs"><span class="hs-identifier hs-var">IPI.includeDirs</span></a></span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679724923"><span class="hs-identifier hs-var">absinc</span></a></span><span> </span><span class="annot"><span class="annottext">[String] -&gt; [String] -&gt; [String]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">[String] -&gt; [String]
</span><a href="#local-6989586621679724995"><span class="hs-identifier hs-var">adjustRelIncDirs</span></a></span><span> </span><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679724922"><span class="hs-identifier hs-var">relinc</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-436"></span><span>    </span><span class="annot"><span class="annottext">includes :: [String]
</span><a href="Distribution.Types.InstalledPackageInfo.html#includes"><span class="hs-identifier hs-var">IPI.includes</span></a></span><span>           </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">BuildInfo -&gt; [String]
</span><a href="Distribution.Types.BuildInfo.html#includes"><span class="hs-identifier hs-var hs-var">includes</span></a></span><span> </span><span class="annot"><span class="annottext">BuildInfo
</span><a href="#local-6989586621679724946"><span class="hs-identifier hs-var">bi</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-437"></span><span>    </span><span class="annot"><span class="annottext">depends :: [UnitId]
</span><a href="Distribution.Types.InstalledPackageInfo.html#depends"><span class="hs-identifier hs-var">IPI.depends</span></a></span><span>            </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[UnitId]
</span><a href="#local-6989586621679724918"><span class="hs-identifier hs-var">depends</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-438"></span><span>    </span><span class="annot"><span class="annottext">abiDepends :: [AbiDependency]
</span><a href="Distribution.Types.InstalledPackageInfo.html#abiDepends"><span class="hs-identifier hs-var">IPI.abiDepends</span></a></span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span class="hs-special">,</span><span> </span><span class="hs-comment">-- due to #5465</span><span>
</span><span id="line-439"></span><span>    </span><span class="annot"><span class="annottext">ccOptions :: [String]
</span><a href="Distribution.Types.InstalledPackageInfo.html#ccOptions"><span class="hs-identifier hs-var">IPI.ccOptions</span></a></span><span>          </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span class="hs-special">,</span><span> </span><span class="hs-comment">-- Note. NOT ccOptions bi!</span><span>
</span><span id="line-440"></span><span>                                 </span><span class="hs-comment">-- We don't want cc-options to be propagated</span><span>
</span><span id="line-441"></span><span>                                 </span><span class="hs-comment">-- to C compilations in other packages.</span><span>
</span><span id="line-442"></span><span>    </span><span class="annot"><span class="annottext">cxxOptions :: [String]
</span><a href="Distribution.Types.InstalledPackageInfo.html#cxxOptions"><span class="hs-identifier hs-var">IPI.cxxOptions</span></a></span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span class="hs-special">,</span><span> </span><span class="hs-comment">-- Also. NOT cxxOptions bi!</span><span>
</span><span id="line-443"></span><span>    </span><span class="annot"><span class="annottext">ldOptions :: [String]
</span><a href="Distribution.Types.InstalledPackageInfo.html#ldOptions"><span class="hs-identifier hs-var">IPI.ldOptions</span></a></span><span>          </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">BuildInfo -&gt; [String]
</span><a href="Distribution.Types.BuildInfo.html#ldOptions"><span class="hs-identifier hs-var hs-var">ldOptions</span></a></span><span> </span><span class="annot"><span class="annottext">BuildInfo
</span><a href="#local-6989586621679724946"><span class="hs-identifier hs-var">bi</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-444"></span><span>    </span><span class="annot"><span class="annottext">frameworks :: [String]
</span><a href="Distribution.Types.InstalledPackageInfo.html#frameworks"><span class="hs-identifier hs-var">IPI.frameworks</span></a></span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">BuildInfo -&gt; [String]
</span><a href="Distribution.Types.BuildInfo.html#frameworks"><span class="hs-identifier hs-var hs-var">frameworks</span></a></span><span> </span><span class="annot"><span class="annottext">BuildInfo
</span><a href="#local-6989586621679724946"><span class="hs-identifier hs-var">bi</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-445"></span><span>    </span><span class="annot"><span class="annottext">frameworkDirs :: [String]
</span><a href="Distribution.Types.InstalledPackageInfo.html#frameworkDirs"><span class="hs-identifier hs-var">IPI.frameworkDirs</span></a></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">BuildInfo -&gt; [String]
</span><a href="Distribution.Types.BuildInfo.html#extraFrameworkDirs"><span class="hs-identifier hs-var hs-var">extraFrameworkDirs</span></a></span><span> </span><span class="annot"><span class="annottext">BuildInfo
</span><a href="#local-6989586621679724946"><span class="hs-identifier hs-var">bi</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-446"></span><span>    </span><span class="annot"><span class="annottext">haddockInterfaces :: [String]
</span><a href="Distribution.Types.InstalledPackageInfo.html#haddockInterfaces"><span class="hs-identifier hs-var">IPI.haddockInterfaces</span></a></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">InstallDirs String -&gt; String
forall dir. InstallDirs dir -&gt; dir
</span><a href="Distribution.Simple.InstallDirs.html#haddockdir"><span class="hs-identifier hs-var hs-var">haddockdir</span></a></span><span> </span><span class="annot"><span class="annottext">InstallDirs String
</span><a href="#local-6989586621679724989"><span class="hs-identifier hs-var">installDirs</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
</span><a href="../../filepath/src/System.FilePath.Windows.html#%3C%2F%3E"><span class="hs-operator hs-var">&lt;/&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">PackageDescription -&gt; String
</span><a href="Distribution.Simple.BuildPaths.html#haddockName"><span class="hs-identifier hs-var">haddockName</span></a></span><span> </span><span class="annot"><span class="annottext">PackageDescription
</span><a href="#local-6989586621679724994"><span class="hs-identifier hs-var">pkg</span></a></span><span class="hs-special">]</span><span class="hs-special">,</span><span>
</span><span id="line-447"></span><span>    </span><span class="annot"><span class="annottext">haddockHTMLs :: [String]
</span><a href="Distribution.Types.InstalledPackageInfo.html#haddockHTMLs"><span class="hs-identifier hs-var">IPI.haddockHTMLs</span></a></span><span>       </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">InstallDirs String -&gt; String
forall dir. InstallDirs dir -&gt; dir
</span><a href="Distribution.Simple.InstallDirs.html#htmldir"><span class="hs-identifier hs-var hs-var">htmldir</span></a></span><span> </span><span class="annot"><span class="annottext">InstallDirs String
</span><a href="#local-6989586621679724989"><span class="hs-identifier hs-var">installDirs</span></a></span><span class="hs-special">]</span><span class="hs-special">,</span><span>
</span><span id="line-448"></span><span>    </span><span class="annot"><span class="annottext">pkgRoot :: Maybe String
</span><a href="Distribution.Types.InstalledPackageInfo.html#pkgRoot"><span class="hs-identifier hs-var">IPI.pkgRoot</span></a></span><span>            </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Maybe String
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-449"></span><span>    </span><span class="annot"><span class="annottext">libVisibility :: LibraryVisibility
</span><a href="Distribution.Types.InstalledPackageInfo.html#libVisibility"><span class="hs-identifier hs-var">IPI.libVisibility</span></a></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Library -&gt; LibraryVisibility
</span><a href="Distribution.Types.Library.html#libVisibility"><span class="hs-identifier hs-var hs-var">libVisibility</span></a></span><span> </span><span class="annot"><span class="annottext">Library
</span><a href="#local-6989586621679724992"><span class="hs-identifier hs-var">lib</span></a></span><span>
</span><span id="line-450"></span><span>  </span><span class="hs-special">}</span><span>
</span><span id="line-451"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-452"></span><span>    </span><span id="local-6989586621679724978"><span class="annot"><span class="annottext">ghc84 :: Bool
</span><a href="#local-6989586621679724978"><span class="hs-identifier hs-var hs-var">ghc84</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Compiler -&gt; CompilerId
</span><a href="Distribution.Simple.Compiler.html#compilerId"><span class="hs-identifier hs-var hs-var">compilerId</span></a></span><span> </span><span class="annot"><span class="annottext">(Compiler -&gt; CompilerId) -&gt; Compiler -&gt; CompilerId
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo -&gt; Compiler
</span><a href="Distribution.Types.LocalBuildInfo.html#compiler"><span class="hs-identifier hs-var hs-var">compiler</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679724991"><span class="hs-identifier hs-var">lbi</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-453"></span><span>        </span><span class="annot"><a href="Distribution.Compiler.html#CompilerId"><span class="hs-identifier hs-type">CompilerId</span></a></span><span> </span><span class="annot"><span class="annottext">CompilerFlavor
</span><a href="Distribution.Compiler.html#GHC"><span class="hs-identifier hs-var">GHC</span></a></span><span> </span><span id="local-6989586621679724896"><span class="annot"><span class="annottext">Version
</span><a href="#local-6989586621679724896"><span class="hs-identifier hs-var">v</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Version
</span><a href="#local-6989586621679724896"><span class="hs-identifier hs-var">v</span></a></span><span> </span><span class="annot"><span class="annottext">Version -&gt; Version -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">&gt;=</span></span><span> </span><span class="annot"><span class="annottext">[Int] -&gt; Version
</span><a href="Distribution.Types.Version.html#mkVersion"><span class="hs-identifier hs-var">mkVersion</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">8</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">4</span></span><span class="hs-special">]</span><span>
</span><span id="line-454"></span><span>        </span><span class="annot"><span class="annottext">CompilerId
</span><span class="hs-identifier">_</span></span><span>                </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>
</span><span id="line-455"></span><span>
</span><span id="line-456"></span><span>    </span><span id="local-6989586621679724946"><span class="annot"><span class="annottext">bi :: BuildInfo
</span><a href="#local-6989586621679724946"><span class="hs-identifier hs-var hs-var">bi</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Library -&gt; BuildInfo
</span><a href="Distribution.Types.Library.html#libBuildInfo"><span class="hs-identifier hs-var hs-var">libBuildInfo</span></a></span><span> </span><span class="annot"><span class="annottext">Library
</span><a href="#local-6989586621679724992"><span class="hs-identifier hs-var">lib</span></a></span><span>
</span><span id="line-457"></span><span>    </span><span class="hs-comment">--TODO: unclear what the root cause of the</span><span>
</span><span id="line-458"></span><span>    </span><span class="hs-comment">-- duplication is, but we nub it here for now:</span><span>
</span><span id="line-459"></span><span>    </span><span id="local-6989586621679724918"><span class="annot"><span class="annottext">depends :: [UnitId]
</span><a href="#local-6989586621679724918"><span class="hs-identifier hs-var hs-var">depends</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[UnitId] -&gt; [UnitId]
forall a. Ord a =&gt; [a] -&gt; [a]
</span><a href="Distribution.Utils.Generic.html#ordNub"><span class="hs-identifier hs-var">ordNub</span></a></span><span> </span><span class="annot"><span class="annottext">([UnitId] -&gt; [UnitId]) -&gt; [UnitId] -&gt; [UnitId]
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">((UnitId, MungedPackageId) -&gt; UnitId)
-&gt; [(UnitId, MungedPackageId)] -&gt; [UnitId]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">(UnitId, MungedPackageId) -&gt; UnitId
forall a b. (a, b) -&gt; a
</span><a href="../../base/src/Data.Tuple.html#fst"><span class="hs-identifier hs-var">fst</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ComponentLocalBuildInfo -&gt; [(UnitId, MungedPackageId)]
</span><a href="Distribution.Types.ComponentLocalBuildInfo.html#componentPackageDeps"><span class="hs-identifier hs-var hs-var">componentPackageDeps</span></a></span><span> </span><span class="annot"><span class="annottext">ComponentLocalBuildInfo
</span><a href="#local-6989586621679724990"><span class="hs-identifier hs-var">clbi</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-460"></span><span>    </span><span class="hs-special">(</span><span id="local-6989586621679724923"><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679724923"><span class="hs-identifier hs-var">absinc</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679724922"><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679724922"><span class="hs-identifier hs-var">relinc</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(String -&gt; Bool) -&gt; [String] -&gt; ([String], [String])
forall a. (a -&gt; Bool) -&gt; [a] -&gt; ([a], [a])
</span><a href="../../base/src/Data.OldList.html#partition"><span class="hs-identifier hs-var">partition</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; Bool
</span><a href="../../filepath/src/System.FilePath.Windows.html#isAbsolute"><span class="hs-identifier hs-var">isAbsolute</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">BuildInfo -&gt; [String]
</span><a href="Distribution.Types.BuildInfo.html#includeDirs"><span class="hs-identifier hs-var hs-var">includeDirs</span></a></span><span> </span><span class="annot"><span class="annottext">BuildInfo
</span><a href="#local-6989586621679724946"><span class="hs-identifier hs-var">bi</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-461"></span><span>    </span><span id="local-6989586621679724939"><span class="annot"><span class="annottext">hasModules :: Bool
</span><a href="#local-6989586621679724939"><span class="hs-identifier hs-var hs-var">hasModules</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool
</span><span class="hs-identifier hs-var">not</span></span><span> </span><span class="annot"><span class="annottext">(Bool -&gt; Bool) -&gt; Bool -&gt; Bool
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">[ModuleName] -&gt; Bool
forall (t :: * -&gt; *) a. Foldable t =&gt; t a -&gt; Bool
</span><a href="../../base/src/Data.Foldable.html#null"><span class="hs-identifier hs-var">null</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Library -&gt; ComponentLocalBuildInfo -&gt; [ModuleName]
</span><a href="Distribution.Simple.LocalBuildInfo.html#allLibModules"><span class="hs-identifier hs-var">allLibModules</span></a></span><span> </span><span class="annot"><span class="annottext">Library
</span><a href="#local-6989586621679724992"><span class="hs-identifier hs-var">lib</span></a></span><span> </span><span class="annot"><span class="annottext">ComponentLocalBuildInfo
</span><a href="#local-6989586621679724990"><span class="hs-identifier hs-var">clbi</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-462"></span><span>    </span><span id="local-6989586621679724883"><span class="annot"><span class="annottext">comp :: Compiler
</span><a href="#local-6989586621679724883"><span class="hs-identifier hs-var hs-var">comp</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo -&gt; Compiler
</span><a href="Distribution.Types.LocalBuildInfo.html#compiler"><span class="hs-identifier hs-var hs-var">compiler</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679724991"><span class="hs-identifier hs-var">lbi</span></a></span><span>
</span><span id="line-463"></span><span>    </span><span id="local-6989586621679724931"><span class="annot"><span class="annottext">hasLibrary :: Bool
</span><a href="#local-6989586621679724931"><span class="hs-identifier hs-var hs-var">hasLibrary</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679724939"><span class="hs-identifier hs-var">hasModules</span></a></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">||</span></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool
</span><span class="hs-identifier hs-var">not</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[String] -&gt; Bool
forall (t :: * -&gt; *) a. Foldable t =&gt; t a -&gt; Bool
</span><a href="../../base/src/Data.Foldable.html#null"><span class="hs-identifier hs-var">null</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">BuildInfo -&gt; [String]
</span><a href="Distribution.Types.BuildInfo.html#cSources"><span class="hs-identifier hs-var hs-var">cSources</span></a></span><span> </span><span class="annot"><span class="annottext">BuildInfo
</span><a href="#local-6989586621679724946"><span class="hs-identifier hs-var">bi</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-464"></span><span>                             </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">||</span></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool
</span><span class="hs-identifier hs-var">not</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[String] -&gt; Bool
forall (t :: * -&gt; *) a. Foldable t =&gt; t a -&gt; Bool
</span><a href="../../base/src/Data.Foldable.html#null"><span class="hs-identifier hs-var">null</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">BuildInfo -&gt; [String]
</span><a href="Distribution.Types.BuildInfo.html#asmSources"><span class="hs-identifier hs-var hs-var">asmSources</span></a></span><span> </span><span class="annot"><span class="annottext">BuildInfo
</span><a href="#local-6989586621679724946"><span class="hs-identifier hs-var">bi</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-465"></span><span>                             </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">||</span></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool
</span><span class="hs-identifier hs-var">not</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[String] -&gt; Bool
forall (t :: * -&gt; *) a. Foldable t =&gt; t a -&gt; Bool
</span><a href="../../base/src/Data.Foldable.html#null"><span class="hs-identifier hs-var">null</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">BuildInfo -&gt; [String]
</span><a href="Distribution.Types.BuildInfo.html#cmmSources"><span class="hs-identifier hs-var hs-var">cmmSources</span></a></span><span> </span><span class="annot"><span class="annottext">BuildInfo
</span><a href="#local-6989586621679724946"><span class="hs-identifier hs-var">bi</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-466"></span><span>                             </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">||</span></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool
</span><span class="hs-identifier hs-var">not</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[String] -&gt; Bool
forall (t :: * -&gt; *) a. Foldable t =&gt; t a -&gt; Bool
</span><a href="../../base/src/Data.Foldable.html#null"><span class="hs-identifier hs-var">null</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">BuildInfo -&gt; [String]
</span><a href="Distribution.Types.BuildInfo.html#cxxSources"><span class="hs-identifier hs-var hs-var">cxxSources</span></a></span><span> </span><span class="annot"><span class="annottext">BuildInfo
</span><a href="#local-6989586621679724946"><span class="hs-identifier hs-var">bi</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-467"></span><span>                             </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">||</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool -&gt; Bool
</span><span class="hs-identifier hs-var">not</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[String] -&gt; Bool
forall (t :: * -&gt; *) a. Foldable t =&gt; t a -&gt; Bool
</span><a href="../../base/src/Data.Foldable.html#null"><span class="hs-identifier hs-var">null</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">BuildInfo -&gt; [String]
</span><a href="Distribution.Types.BuildInfo.html#jsSources"><span class="hs-identifier hs-var hs-var">jsSources</span></a></span><span> </span><span class="annot"><span class="annottext">BuildInfo
</span><a href="#local-6989586621679724946"><span class="hs-identifier hs-var">bi</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">&amp;&amp;</span></span><span>
</span><span id="line-468"></span><span>                                </span><span class="annot"><span class="annottext">Compiler -&gt; CompilerFlavor
</span><a href="Distribution.Simple.Compiler.html#compilerFlavor"><span class="hs-identifier hs-var">compilerFlavor</span></a></span><span> </span><span class="annot"><span class="annottext">Compiler
</span><a href="#local-6989586621679724883"><span class="hs-identifier hs-var">comp</span></a></span><span> </span><span class="annot"><span class="annottext">CompilerFlavor -&gt; CompilerFlavor -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">==</span></span><span> </span><span class="annot"><span class="annottext">CompilerFlavor
</span><a href="Distribution.Compiler.html#GHCJS"><span class="hs-identifier hs-var">GHCJS</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-469"></span><span>               </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">&amp;&amp;</span></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool
</span><span class="hs-identifier hs-var">not</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ComponentLocalBuildInfo -&gt; Bool
</span><a href="Distribution.Types.ComponentLocalBuildInfo.html#componentIsIndefinite"><span class="hs-identifier hs-var">componentIsIndefinite</span></a></span><span> </span><span class="annot"><span class="annottext">ComponentLocalBuildInfo
</span><a href="#local-6989586621679724990"><span class="hs-identifier hs-var">clbi</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-470"></span><span>    </span><span class="hs-special">(</span><span id="local-6989586621679724937"><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679724937"><span class="hs-identifier hs-var">libdirs</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679724935"><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679724935"><span class="hs-identifier hs-var">dynlibdirs</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-471"></span><span>      </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool
</span><span class="hs-identifier hs-var">not</span></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679724931"><span class="hs-identifier hs-var">hasLibrary</span></a></span><span>
</span><span id="line-472"></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">BuildInfo -&gt; [String]
</span><a href="Distribution.Types.BuildInfo.html#extraLibDirs"><span class="hs-identifier hs-var hs-var">extraLibDirs</span></a></span><span> </span><span class="annot"><span class="annottext">BuildInfo
</span><a href="#local-6989586621679724946"><span class="hs-identifier hs-var">bi</span></a></span><span class="hs-special">,</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span class="hs-special">)</span><span>
</span><span id="line-473"></span><span>      </span><span class="hs-comment">-- the dynamic-library-dirs defaults to the library-dirs if not specified,</span><span>
</span><span id="line-474"></span><span>      </span><span class="hs-comment">-- so this works whether the dynamic-library-dirs field is supported or not</span><span>
</span><span id="line-475"></span><span>
</span><span id="line-476"></span><span>      </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Compiler -&gt; Bool
</span><a href="Distribution.Simple.Compiler.html#libraryDynDirSupported"><span class="hs-identifier hs-var">libraryDynDirSupported</span></a></span><span> </span><span class="annot"><span class="annottext">Compiler
</span><a href="#local-6989586621679724883"><span class="hs-identifier hs-var">comp</span></a></span><span>
</span><span id="line-477"></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">InstallDirs String -&gt; String
forall dir. InstallDirs dir -&gt; dir
</span><a href="Distribution.Simple.InstallDirs.html#libdir"><span class="hs-identifier hs-var hs-var">libdir</span></a></span><span>    </span><span class="annot"><span class="annottext">InstallDirs String
</span><a href="#local-6989586621679724989"><span class="hs-identifier hs-var">installDirs</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; [String] -&gt; [String]
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span> </span><span class="annot"><span class="annottext">BuildInfo -&gt; [String]
</span><a href="Distribution.Types.BuildInfo.html#extraLibDirs"><span class="hs-identifier hs-var hs-var">extraLibDirs</span></a></span><span> </span><span class="annot"><span class="annottext">BuildInfo
</span><a href="#local-6989586621679724946"><span class="hs-identifier hs-var">bi</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-478"></span><span>         </span><span class="annot"><span class="annottext">InstallDirs String -&gt; String
forall dir. InstallDirs dir -&gt; dir
</span><a href="Distribution.Simple.InstallDirs.html#dynlibdir"><span class="hs-identifier hs-var hs-var">dynlibdir</span></a></span><span> </span><span class="annot"><span class="annottext">InstallDirs String
</span><a href="#local-6989586621679724989"><span class="hs-identifier hs-var">installDirs</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; [String] -&gt; [String]
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span> </span><span class="annot"><span class="annottext">BuildInfo -&gt; [String]
</span><a href="Distribution.Types.BuildInfo.html#extraLibDirs"><span class="hs-identifier hs-var hs-var">extraLibDirs</span></a></span><span> </span><span class="annot"><span class="annottext">BuildInfo
</span><a href="#local-6989586621679724946"><span class="hs-identifier hs-var">bi</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-479"></span><span>
</span><span id="line-480"></span><span>      </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>
</span><span id="line-481"></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">InstallDirs String -&gt; String
forall dir. InstallDirs dir -&gt; dir
</span><a href="Distribution.Simple.InstallDirs.html#libdir"><span class="hs-identifier hs-var hs-var">libdir</span></a></span><span> </span><span class="annot"><span class="annottext">InstallDirs String
</span><a href="#local-6989586621679724989"><span class="hs-identifier hs-var">installDirs</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; [String] -&gt; [String]
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span> </span><span class="annot"><span class="annottext">InstallDirs String -&gt; String
forall dir. InstallDirs dir -&gt; dir
</span><a href="Distribution.Simple.InstallDirs.html#dynlibdir"><span class="hs-identifier hs-var hs-var">dynlibdir</span></a></span><span> </span><span class="annot"><span class="annottext">InstallDirs String
</span><a href="#local-6989586621679724989"><span class="hs-identifier hs-var">installDirs</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; [String] -&gt; [String]
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span> </span><span class="annot"><span class="annottext">BuildInfo -&gt; [String]
</span><a href="Distribution.Types.BuildInfo.html#extraLibDirs"><span class="hs-identifier hs-var hs-var">extraLibDirs</span></a></span><span> </span><span class="annot"><span class="annottext">BuildInfo
</span><a href="#local-6989586621679724946"><span class="hs-identifier hs-var">bi</span></a></span><span class="hs-special">,</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span class="hs-special">)</span><span>
</span><span id="line-482"></span><span>      </span><span class="hs-comment">-- the compiler doesn't understand the dynamic-library-dirs field so we</span><span>
</span><span id="line-483"></span><span>      </span><span class="hs-comment">-- add the dyn directory to the &quot;normal&quot; list in the library-dirs field</span><span>
</span><span id="line-484"></span><span>
</span><span id="line-485"></span><span class="hs-comment">-- | Construct 'InstalledPackageInfo' for a library that is in place in the</span><span>
</span><span id="line-486"></span><span class="hs-comment">-- build tree.</span><span>
</span><span id="line-487"></span><span class="hs-comment">--</span><span>
</span><span id="line-488"></span><span class="hs-comment">-- This function knows about the layout of in place packages.</span><span>
</span><span id="line-489"></span><span class="hs-comment">--</span><span>
</span><span id="line-490"></span><span class="annot"><a href="Distribution.Simple.Register.html#inplaceInstalledPackageInfo"><span class="hs-identifier hs-type">inplaceInstalledPackageInfo</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.IO.html#FilePath"><span class="hs-identifier hs-type">FilePath</span></a></span><span> </span><span class="hs-comment">-- ^ top of the build tree</span><span>
</span><span id="line-491"></span><span>                            </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.IO.html#FilePath"><span class="hs-identifier hs-type">FilePath</span></a></span><span> </span><span class="hs-comment">-- ^ location of the dist tree</span><span>
</span><span id="line-492"></span><span>                            </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.PackageDescription.html#PackageDescription"><span class="hs-identifier hs-type">PackageDescription</span></a></span><span>
</span><span id="line-493"></span><span>                            </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.AbiHash.html#AbiHash"><span class="hs-identifier hs-type">AbiHash</span></a></span><span>
</span><span id="line-494"></span><span>                            </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.Library.html#Library"><span class="hs-identifier hs-type">Library</span></a></span><span>
</span><span id="line-495"></span><span>                            </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.LocalBuildInfo.html#LocalBuildInfo"><span class="hs-identifier hs-type">LocalBuildInfo</span></a></span><span>
</span><span id="line-496"></span><span>                            </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.ComponentLocalBuildInfo.html#ComponentLocalBuildInfo"><span class="hs-identifier hs-type">ComponentLocalBuildInfo</span></a></span><span>
</span><span id="line-497"></span><span>                            </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.InstalledPackageInfo.html#InstalledPackageInfo"><span class="hs-identifier hs-type">InstalledPackageInfo</span></a></span><span>
</span><span id="line-498"></span><span id="inplaceInstalledPackageInfo"><span class="annot"><span class="annottext">inplaceInstalledPackageInfo :: String
-&gt; String
-&gt; PackageDescription
-&gt; AbiHash
-&gt; Library
-&gt; LocalBuildInfo
-&gt; ComponentLocalBuildInfo
-&gt; InstalledPackageInfo
</span><a href="Distribution.Simple.Register.html#inplaceInstalledPackageInfo"><span class="hs-identifier hs-var hs-var">inplaceInstalledPackageInfo</span></a></span></span><span> </span><span id="local-6989586621679724866"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679724866"><span class="hs-identifier hs-var">inplaceDir</span></a></span></span><span> </span><span id="local-6989586621679724865"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679724865"><span class="hs-identifier hs-var">distPref</span></a></span></span><span> </span><span id="local-6989586621679724864"><span class="annot"><span class="annottext">PackageDescription
</span><a href="#local-6989586621679724864"><span class="hs-identifier hs-var">pkg</span></a></span></span><span> </span><span id="local-6989586621679724863"><span class="annot"><span class="annottext">AbiHash
</span><a href="#local-6989586621679724863"><span class="hs-identifier hs-var">abi_hash</span></a></span></span><span> </span><span id="local-6989586621679724862"><span class="annot"><span class="annottext">Library
</span><a href="#local-6989586621679724862"><span class="hs-identifier hs-var">lib</span></a></span></span><span> </span><span id="local-6989586621679724861"><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679724861"><span class="hs-identifier hs-var">lbi</span></a></span></span><span> </span><span id="local-6989586621679724860"><span class="annot"><span class="annottext">ComponentLocalBuildInfo
</span><a href="#local-6989586621679724860"><span class="hs-identifier hs-var">clbi</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-499"></span><span>    </span><span class="annot"><span class="annottext">([String] -&gt; [String])
-&gt; PackageDescription
-&gt; AbiHash
-&gt; Library
-&gt; LocalBuildInfo
-&gt; ComponentLocalBuildInfo
-&gt; InstallDirs String
-&gt; InstalledPackageInfo
</span><a href="Distribution.Simple.Register.html#generalInstalledPackageInfo"><span class="hs-identifier hs-var">generalInstalledPackageInfo</span></a></span><span> </span><span class="annot"><span class="annottext">[String] -&gt; [String]
</span><a href="#local-6989586621679724859"><span class="hs-identifier hs-var">adjustRelativeIncludeDirs</span></a></span><span>
</span><span id="line-500"></span><span>                                </span><span class="annot"><span class="annottext">PackageDescription
</span><a href="#local-6989586621679724864"><span class="hs-identifier hs-var">pkg</span></a></span><span> </span><span class="annot"><span class="annottext">AbiHash
</span><a href="#local-6989586621679724863"><span class="hs-identifier hs-var">abi_hash</span></a></span><span> </span><span class="annot"><span class="annottext">Library
</span><a href="#local-6989586621679724862"><span class="hs-identifier hs-var">lib</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679724861"><span class="hs-identifier hs-var">lbi</span></a></span><span> </span><span class="annot"><span class="annottext">ComponentLocalBuildInfo
</span><a href="#local-6989586621679724860"><span class="hs-identifier hs-var">clbi</span></a></span><span> </span><span class="annot"><span class="annottext">InstallDirs String
</span><a href="#local-6989586621679724858"><span class="hs-identifier hs-var">installDirs</span></a></span><span>
</span><span id="line-501"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-502"></span><span>    </span><span id="local-6989586621679724859"><span class="annot"><span class="annottext">adjustRelativeIncludeDirs :: [String] -&gt; [String]
</span><a href="#local-6989586621679724859"><span class="hs-identifier hs-var hs-var">adjustRelativeIncludeDirs</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(String -&gt; [String]) -&gt; [String] -&gt; [String]
forall (t :: * -&gt; *) a b. Foldable t =&gt; (a -&gt; [b]) -&gt; t a -&gt; [b]
</span><a href="../../base/src/Data.Foldable.html#concatMap"><span class="hs-identifier hs-var">concatMap</span></a></span><span> </span><span class="annot"><span class="annottext">((String -&gt; [String]) -&gt; [String] -&gt; [String])
-&gt; (String -&gt; [String]) -&gt; [String] -&gt; [String]
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-glyph">\</span><span id="local-6989586621679724855"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679724855"><span class="hs-identifier hs-var">d</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-503"></span><span>      </span><span class="hs-special">[</span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679724866"><span class="hs-identifier hs-var">inplaceDir</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
</span><a href="../../filepath/src/System.FilePath.Windows.html#%3C%2F%3E"><span class="hs-operator hs-var">&lt;/&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679724855"><span class="hs-identifier hs-var">d</span></a></span><span>                    </span><span class="hs-comment">-- local include-dir</span><span>
</span><span id="line-504"></span><span>      </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679724866"><span class="hs-identifier hs-var">inplaceDir</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
</span><a href="../../filepath/src/System.FilePath.Windows.html#%3C%2F%3E"><span class="hs-operator hs-var">&lt;/&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679724854"><span class="hs-identifier hs-var">libTargetDir</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
</span><a href="../../filepath/src/System.FilePath.Windows.html#%3C%2F%3E"><span class="hs-operator hs-var">&lt;/&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679724855"><span class="hs-identifier hs-var">d</span></a></span><span>   </span><span class="hs-comment">-- autogen include-dir</span><span>
</span><span id="line-505"></span><span>      </span><span class="hs-special">]</span><span>
</span><span id="line-506"></span><span>    </span><span id="local-6989586621679724854"><span class="annot"><span class="annottext">libTargetDir :: String
</span><a href="#local-6989586621679724854"><span class="hs-identifier hs-var hs-var">libTargetDir</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo -&gt; ComponentLocalBuildInfo -&gt; String
</span><a href="Distribution.Simple.LocalBuildInfo.html#componentBuildDir"><span class="hs-identifier hs-var">componentBuildDir</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679724861"><span class="hs-identifier hs-var">lbi</span></a></span><span> </span><span class="annot"><span class="annottext">ComponentLocalBuildInfo
</span><a href="#local-6989586621679724860"><span class="hs-identifier hs-var">clbi</span></a></span><span>
</span><span id="line-507"></span><span>    </span><span id="local-6989586621679724858"><span class="annot"><span class="annottext">installDirs :: InstallDirs String
</span><a href="#local-6989586621679724858"><span class="hs-identifier hs-var hs-var">installDirs</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-508"></span><span>      </span><span class="hs-special">(</span><span class="annot"><span class="annottext">PackageDescription
-&gt; LocalBuildInfo -&gt; UnitId -&gt; CopyDest -&gt; InstallDirs String
</span><a href="Distribution.Simple.LocalBuildInfo.html#absoluteComponentInstallDirs"><span class="hs-identifier hs-var">absoluteComponentInstallDirs</span></a></span><span> </span><span class="annot"><span class="annottext">PackageDescription
</span><a href="#local-6989586621679724864"><span class="hs-identifier hs-var">pkg</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679724861"><span class="hs-identifier hs-var">lbi</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ComponentLocalBuildInfo -&gt; UnitId
</span><a href="Distribution.Types.ComponentLocalBuildInfo.html#componentUnitId"><span class="hs-identifier hs-var hs-var">componentUnitId</span></a></span><span> </span><span class="annot"><span class="annottext">ComponentLocalBuildInfo
</span><a href="#local-6989586621679724860"><span class="hs-identifier hs-var">clbi</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">CopyDest
</span><a href="Distribution.Simple.InstallDirs.html#NoCopyDest"><span class="hs-identifier hs-var">NoCopyDest</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">{</span><span>
</span><span id="line-509"></span><span>        </span><span class="annot"><span class="annottext">libdir :: String
</span><a href="Distribution.Simple.InstallDirs.html#libdir"><span class="hs-identifier hs-var">libdir</span></a></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679724866"><span class="hs-identifier hs-var">inplaceDir</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
</span><a href="../../filepath/src/System.FilePath.Windows.html#%3C%2F%3E"><span class="hs-operator hs-var">&lt;/&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679724854"><span class="hs-identifier hs-var">libTargetDir</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-510"></span><span>        </span><span class="annot"><span class="annottext">dynlibdir :: String
</span><a href="Distribution.Simple.InstallDirs.html#dynlibdir"><span class="hs-identifier hs-var">dynlibdir</span></a></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679724866"><span class="hs-identifier hs-var">inplaceDir</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
</span><a href="../../filepath/src/System.FilePath.Windows.html#%3C%2F%3E"><span class="hs-operator hs-var">&lt;/&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679724854"><span class="hs-identifier hs-var">libTargetDir</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-511"></span><span>        </span><span class="annot"><span class="annottext">datadir :: String
</span><a href="Distribution.Simple.InstallDirs.html#datadir"><span class="hs-identifier hs-var">datadir</span></a></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679724866"><span class="hs-identifier hs-var">inplaceDir</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
</span><a href="../../filepath/src/System.FilePath.Windows.html#%3C%2F%3E"><span class="hs-operator hs-var">&lt;/&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">PackageDescription -&gt; String
</span><a href="Distribution.Types.PackageDescription.html#dataDir"><span class="hs-identifier hs-var hs-var">dataDir</span></a></span><span> </span><span class="annot"><span class="annottext">PackageDescription
</span><a href="#local-6989586621679724864"><span class="hs-identifier hs-var">pkg</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-512"></span><span>        </span><span class="annot"><span class="annottext">docdir :: String
</span><a href="Distribution.Simple.InstallDirs.html#docdir"><span class="hs-identifier hs-var">docdir</span></a></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679724848"><span class="hs-identifier hs-var">inplaceDocdir</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-513"></span><span>        </span><span class="annot"><span class="annottext">htmldir :: String
</span><a href="Distribution.Simple.InstallDirs.html#htmldir"><span class="hs-identifier hs-var">htmldir</span></a></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679724847"><span class="hs-identifier hs-var">inplaceHtmldir</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-514"></span><span>        </span><span class="annot"><span class="annottext">haddockdir :: String
</span><a href="Distribution.Simple.InstallDirs.html#haddockdir"><span class="hs-identifier hs-var">haddockdir</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679724847"><span class="hs-identifier hs-var">inplaceHtmldir</span></a></span><span>
</span><span id="line-515"></span><span>      </span><span class="hs-special">}</span><span>
</span><span id="line-516"></span><span>    </span><span id="local-6989586621679724848"><span class="annot"><span class="annottext">inplaceDocdir :: String
</span><a href="#local-6989586621679724848"><span class="hs-identifier hs-var hs-var">inplaceDocdir</span></a></span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679724866"><span class="hs-identifier hs-var">inplaceDir</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
</span><a href="../../filepath/src/System.FilePath.Windows.html#%3C%2F%3E"><span class="hs-operator hs-var">&lt;/&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679724865"><span class="hs-identifier hs-var">distPref</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
</span><a href="../../filepath/src/System.FilePath.Windows.html#%3C%2F%3E"><span class="hs-operator hs-var">&lt;/&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;doc&quot;</span></span><span>
</span><span id="line-517"></span><span>    </span><span id="local-6989586621679724847"><span class="annot"><span class="annottext">inplaceHtmldir :: String
</span><a href="#local-6989586621679724847"><span class="hs-identifier hs-var hs-var">inplaceHtmldir</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679724848"><span class="hs-identifier hs-var">inplaceDocdir</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
</span><a href="../../filepath/src/System.FilePath.Windows.html#%3C%2F%3E"><span class="hs-operator hs-var">&lt;/&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;html&quot;</span></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
</span><a href="../../filepath/src/System.FilePath.Windows.html#%3C%2F%3E"><span class="hs-operator hs-var">&lt;/&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">PackageName -&gt; String
forall a. Pretty a =&gt; a -&gt; String
</span><a href="Distribution.Pretty.html#prettyShow"><span class="hs-identifier hs-var">prettyShow</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">PackageDescription -&gt; PackageName
forall pkg. Package pkg =&gt; pkg -&gt; PackageName
</span><a href="Distribution.Package.html#packageName"><span class="hs-identifier hs-var">packageName</span></a></span><span> </span><span class="annot"><span class="annottext">PackageDescription
</span><a href="#local-6989586621679724864"><span class="hs-identifier hs-var">pkg</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-518"></span><span>
</span><span id="line-519"></span><span>
</span><span id="line-520"></span><span class="hs-comment">-- | Construct 'InstalledPackageInfo' for the final install location of a</span><span>
</span><span id="line-521"></span><span class="hs-comment">-- library package.</span><span>
</span><span id="line-522"></span><span class="hs-comment">--</span><span>
</span><span id="line-523"></span><span class="hs-comment">-- This function knows about the layout of installed packages.</span><span>
</span><span id="line-524"></span><span class="hs-comment">--</span><span>
</span><span id="line-525"></span><span class="annot"><a href="Distribution.Simple.Register.html#absoluteInstalledPackageInfo"><span class="hs-identifier hs-type">absoluteInstalledPackageInfo</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Types.PackageDescription.html#PackageDescription"><span class="hs-identifier hs-type">PackageDescription</span></a></span><span>
</span><span id="line-526"></span><span>                             </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.AbiHash.html#AbiHash"><span class="hs-identifier hs-type">AbiHash</span></a></span><span>
</span><span id="line-527"></span><span>                             </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.Library.html#Library"><span class="hs-identifier hs-type">Library</span></a></span><span>
</span><span id="line-528"></span><span>                             </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.LocalBuildInfo.html#LocalBuildInfo"><span class="hs-identifier hs-type">LocalBuildInfo</span></a></span><span>
</span><span id="line-529"></span><span>                             </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.ComponentLocalBuildInfo.html#ComponentLocalBuildInfo"><span class="hs-identifier hs-type">ComponentLocalBuildInfo</span></a></span><span>
</span><span id="line-530"></span><span>                             </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.InstalledPackageInfo.html#InstalledPackageInfo"><span class="hs-identifier hs-type">InstalledPackageInfo</span></a></span><span>
</span><span id="line-531"></span><span id="absoluteInstalledPackageInfo"><span class="annot"><span class="annottext">absoluteInstalledPackageInfo :: PackageDescription
-&gt; AbiHash
-&gt; Library
-&gt; LocalBuildInfo
-&gt; ComponentLocalBuildInfo
-&gt; InstalledPackageInfo
</span><a href="Distribution.Simple.Register.html#absoluteInstalledPackageInfo"><span class="hs-identifier hs-var hs-var">absoluteInstalledPackageInfo</span></a></span></span><span> </span><span id="local-6989586621679724842"><span class="annot"><span class="annottext">PackageDescription
</span><a href="#local-6989586621679724842"><span class="hs-identifier hs-var">pkg</span></a></span></span><span> </span><span id="local-6989586621679724841"><span class="annot"><span class="annottext">AbiHash
</span><a href="#local-6989586621679724841"><span class="hs-identifier hs-var">abi_hash</span></a></span></span><span> </span><span id="local-6989586621679724840"><span class="annot"><span class="annottext">Library
</span><a href="#local-6989586621679724840"><span class="hs-identifier hs-var">lib</span></a></span></span><span> </span><span id="local-6989586621679724839"><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679724839"><span class="hs-identifier hs-var">lbi</span></a></span></span><span> </span><span id="local-6989586621679724838"><span class="annot"><span class="annottext">ComponentLocalBuildInfo
</span><a href="#local-6989586621679724838"><span class="hs-identifier hs-var">clbi</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-532"></span><span>    </span><span class="annot"><span class="annottext">([String] -&gt; [String])
-&gt; PackageDescription
-&gt; AbiHash
-&gt; Library
-&gt; LocalBuildInfo
-&gt; ComponentLocalBuildInfo
-&gt; InstallDirs String
-&gt; InstalledPackageInfo
</span><a href="Distribution.Simple.Register.html#generalInstalledPackageInfo"><span class="hs-identifier hs-var">generalInstalledPackageInfo</span></a></span><span> </span><span class="annot"><span class="annottext">[String] -&gt; [String]
forall {p}. p -&gt; [String]
</span><a href="#local-6989586621679724837"><span class="hs-identifier hs-var">adjustReativeIncludeDirs</span></a></span><span>
</span><span id="line-533"></span><span>                                </span><span class="annot"><span class="annottext">PackageDescription
</span><a href="#local-6989586621679724842"><span class="hs-identifier hs-var">pkg</span></a></span><span> </span><span class="annot"><span class="annottext">AbiHash
</span><a href="#local-6989586621679724841"><span class="hs-identifier hs-var">abi_hash</span></a></span><span> </span><span class="annot"><span class="annottext">Library
</span><a href="#local-6989586621679724840"><span class="hs-identifier hs-var">lib</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679724839"><span class="hs-identifier hs-var">lbi</span></a></span><span> </span><span class="annot"><span class="annottext">ComponentLocalBuildInfo
</span><a href="#local-6989586621679724838"><span class="hs-identifier hs-var">clbi</span></a></span><span> </span><span class="annot"><span class="annottext">InstallDirs String
</span><a href="#local-6989586621679724836"><span class="hs-identifier hs-var">installDirs</span></a></span><span>
</span><span id="line-534"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-535"></span><span>    </span><span class="hs-comment">-- For installed packages we install all include files into one dir,</span><span>
</span><span id="line-536"></span><span>    </span><span class="hs-comment">-- whereas in the build tree they may live in multiple local dirs.</span><span>
</span><span id="line-537"></span><span>    </span><span id="local-6989586621679724837"><span class="annot"><span class="annottext">adjustReativeIncludeDirs :: p -&gt; [String]
</span><a href="#local-6989586621679724837"><span class="hs-identifier hs-var hs-var">adjustReativeIncludeDirs</span></a></span></span><span> </span><span class="annot"><span class="annottext">p
</span><span class="hs-identifier">_</span></span><span>
</span><span id="line-538"></span><span>      </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">[String] -&gt; Bool
forall (t :: * -&gt; *) a. Foldable t =&gt; t a -&gt; Bool
</span><a href="../../base/src/Data.Foldable.html#null"><span class="hs-identifier hs-var">null</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">BuildInfo -&gt; [String]
</span><a href="Distribution.Types.BuildInfo.html#installIncludes"><span class="hs-identifier hs-var hs-var">installIncludes</span></a></span><span> </span><span class="annot"><span class="annottext">BuildInfo
</span><a href="#local-6989586621679724833"><span class="hs-identifier hs-var">bi</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>
</span><span id="line-539"></span><span>      </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>                 </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">InstallDirs String -&gt; String
forall dir. InstallDirs dir -&gt; dir
</span><a href="Distribution.Simple.InstallDirs.html#includedir"><span class="hs-identifier hs-var hs-var">includedir</span></a></span><span> </span><span class="annot"><span class="annottext">InstallDirs String
</span><a href="#local-6989586621679724836"><span class="hs-identifier hs-var">installDirs</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-540"></span><span>    </span><span id="local-6989586621679724833"><span class="annot"><span class="annottext">bi :: BuildInfo
</span><a href="#local-6989586621679724833"><span class="hs-identifier hs-var hs-var">bi</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Library -&gt; BuildInfo
</span><a href="Distribution.Types.Library.html#libBuildInfo"><span class="hs-identifier hs-var hs-var">libBuildInfo</span></a></span><span> </span><span class="annot"><span class="annottext">Library
</span><a href="#local-6989586621679724840"><span class="hs-identifier hs-var">lib</span></a></span><span>
</span><span id="line-541"></span><span>    </span><span id="local-6989586621679724836"><span class="annot"><span class="annottext">installDirs :: InstallDirs String
</span><a href="#local-6989586621679724836"><span class="hs-identifier hs-var hs-var">installDirs</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">PackageDescription
-&gt; LocalBuildInfo -&gt; UnitId -&gt; CopyDest -&gt; InstallDirs String
</span><a href="Distribution.Simple.LocalBuildInfo.html#absoluteComponentInstallDirs"><span class="hs-identifier hs-var">absoluteComponentInstallDirs</span></a></span><span> </span><span class="annot"><span class="annottext">PackageDescription
</span><a href="#local-6989586621679724842"><span class="hs-identifier hs-var">pkg</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679724839"><span class="hs-identifier hs-var">lbi</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ComponentLocalBuildInfo -&gt; UnitId
</span><a href="Distribution.Types.ComponentLocalBuildInfo.html#componentUnitId"><span class="hs-identifier hs-var hs-var">componentUnitId</span></a></span><span> </span><span class="annot"><span class="annottext">ComponentLocalBuildInfo
</span><a href="#local-6989586621679724838"><span class="hs-identifier hs-var">clbi</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">CopyDest
</span><a href="Distribution.Simple.InstallDirs.html#NoCopyDest"><span class="hs-identifier hs-var">NoCopyDest</span></a></span><span>
</span><span id="line-542"></span><span>
</span><span id="line-543"></span><span>
</span><span id="line-544"></span><span class="annot"><a href="Distribution.Simple.Register.html#relocatableInstalledPackageInfo"><span class="hs-identifier hs-type">relocatableInstalledPackageInfo</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Types.PackageDescription.html#PackageDescription"><span class="hs-identifier hs-type">PackageDescription</span></a></span><span>
</span><span id="line-545"></span><span>                                </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.AbiHash.html#AbiHash"><span class="hs-identifier hs-type">AbiHash</span></a></span><span>
</span><span id="line-546"></span><span>                                </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.Library.html#Library"><span class="hs-identifier hs-type">Library</span></a></span><span>
</span><span id="line-547"></span><span>                                </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.LocalBuildInfo.html#LocalBuildInfo"><span class="hs-identifier hs-type">LocalBuildInfo</span></a></span><span>
</span><span id="line-548"></span><span>                                </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.ComponentLocalBuildInfo.html#ComponentLocalBuildInfo"><span class="hs-identifier hs-type">ComponentLocalBuildInfo</span></a></span><span>
</span><span id="line-549"></span><span>                                </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.IO.html#FilePath"><span class="hs-identifier hs-type">FilePath</span></a></span><span>
</span><span id="line-550"></span><span>                                </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.InstalledPackageInfo.html#InstalledPackageInfo"><span class="hs-identifier hs-type">InstalledPackageInfo</span></a></span><span>
</span><span id="line-551"></span><span id="relocatableInstalledPackageInfo"><span class="annot"><span class="annottext">relocatableInstalledPackageInfo :: PackageDescription
-&gt; AbiHash
-&gt; Library
-&gt; LocalBuildInfo
-&gt; ComponentLocalBuildInfo
-&gt; String
-&gt; InstalledPackageInfo
</span><a href="Distribution.Simple.Register.html#relocatableInstalledPackageInfo"><span class="hs-identifier hs-var hs-var">relocatableInstalledPackageInfo</span></a></span></span><span> </span><span id="local-6989586621679724831"><span class="annot"><span class="annottext">PackageDescription
</span><a href="#local-6989586621679724831"><span class="hs-identifier hs-var">pkg</span></a></span></span><span> </span><span id="local-6989586621679724830"><span class="annot"><span class="annottext">AbiHash
</span><a href="#local-6989586621679724830"><span class="hs-identifier hs-var">abi_hash</span></a></span></span><span> </span><span id="local-6989586621679724829"><span class="annot"><span class="annottext">Library
</span><a href="#local-6989586621679724829"><span class="hs-identifier hs-var">lib</span></a></span></span><span> </span><span id="local-6989586621679724828"><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679724828"><span class="hs-identifier hs-var">lbi</span></a></span></span><span> </span><span id="local-6989586621679724827"><span class="annot"><span class="annottext">ComponentLocalBuildInfo
</span><a href="#local-6989586621679724827"><span class="hs-identifier hs-var">clbi</span></a></span></span><span> </span><span id="local-6989586621679724826"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679724826"><span class="hs-identifier hs-var">pkgroot</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-552"></span><span>    </span><span class="annot"><span class="annottext">([String] -&gt; [String])
-&gt; PackageDescription
-&gt; AbiHash
-&gt; Library
-&gt; LocalBuildInfo
-&gt; ComponentLocalBuildInfo
-&gt; InstallDirs String
-&gt; InstalledPackageInfo
</span><a href="Distribution.Simple.Register.html#generalInstalledPackageInfo"><span class="hs-identifier hs-var">generalInstalledPackageInfo</span></a></span><span> </span><span class="annot"><span class="annottext">[String] -&gt; [String]
forall {p}. p -&gt; [String]
</span><a href="#local-6989586621679724825"><span class="hs-identifier hs-var">adjustReativeIncludeDirs</span></a></span><span>
</span><span id="line-553"></span><span>                                </span><span class="annot"><span class="annottext">PackageDescription
</span><a href="#local-6989586621679724831"><span class="hs-identifier hs-var">pkg</span></a></span><span> </span><span class="annot"><span class="annottext">AbiHash
</span><a href="#local-6989586621679724830"><span class="hs-identifier hs-var">abi_hash</span></a></span><span> </span><span class="annot"><span class="annottext">Library
</span><a href="#local-6989586621679724829"><span class="hs-identifier hs-var">lib</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679724828"><span class="hs-identifier hs-var">lbi</span></a></span><span> </span><span class="annot"><span class="annottext">ComponentLocalBuildInfo
</span><a href="#local-6989586621679724827"><span class="hs-identifier hs-var">clbi</span></a></span><span> </span><span class="annot"><span class="annottext">InstallDirs String
</span><a href="#local-6989586621679724824"><span class="hs-identifier hs-var">installDirs</span></a></span><span>
</span><span id="line-554"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-555"></span><span>    </span><span class="hs-comment">-- For installed packages we install all include files into one dir,</span><span>
</span><span id="line-556"></span><span>    </span><span class="hs-comment">-- whereas in the build tree they may live in multiple local dirs.</span><span>
</span><span id="line-557"></span><span>    </span><span id="local-6989586621679724825"><span class="annot"><span class="annottext">adjustReativeIncludeDirs :: p -&gt; [String]
</span><a href="#local-6989586621679724825"><span class="hs-identifier hs-var hs-var">adjustReativeIncludeDirs</span></a></span></span><span> </span><span class="annot"><span class="annottext">p
</span><span class="hs-identifier">_</span></span><span>
</span><span id="line-558"></span><span>      </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">[String] -&gt; Bool
forall (t :: * -&gt; *) a. Foldable t =&gt; t a -&gt; Bool
</span><a href="../../base/src/Data.Foldable.html#null"><span class="hs-identifier hs-var">null</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">BuildInfo -&gt; [String]
</span><a href="Distribution.Types.BuildInfo.html#installIncludes"><span class="hs-identifier hs-var hs-var">installIncludes</span></a></span><span> </span><span class="annot"><span class="annottext">BuildInfo
</span><a href="#local-6989586621679724822"><span class="hs-identifier hs-var">bi</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>
</span><span id="line-559"></span><span>      </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>                 </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">InstallDirs String -&gt; String
forall dir. InstallDirs dir -&gt; dir
</span><a href="Distribution.Simple.InstallDirs.html#includedir"><span class="hs-identifier hs-var hs-var">includedir</span></a></span><span> </span><span class="annot"><span class="annottext">InstallDirs String
</span><a href="#local-6989586621679724824"><span class="hs-identifier hs-var">installDirs</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-560"></span><span>    </span><span id="local-6989586621679724822"><span class="annot"><span class="annottext">bi :: BuildInfo
</span><a href="#local-6989586621679724822"><span class="hs-identifier hs-var hs-var">bi</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Library -&gt; BuildInfo
</span><a href="Distribution.Types.Library.html#libBuildInfo"><span class="hs-identifier hs-var hs-var">libBuildInfo</span></a></span><span> </span><span class="annot"><span class="annottext">Library
</span><a href="#local-6989586621679724829"><span class="hs-identifier hs-var">lib</span></a></span><span>
</span><span id="line-561"></span><span>
</span><span id="line-562"></span><span>    </span><span id="local-6989586621679724824"><span class="annot"><span class="annottext">installDirs :: InstallDirs String
</span><a href="#local-6989586621679724824"><span class="hs-identifier hs-var hs-var">installDirs</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(String -&gt; String) -&gt; InstallDirs String -&gt; InstallDirs String
forall (f :: * -&gt; *) a b. Functor f =&gt; (a -&gt; b) -&gt; f a -&gt; f b
</span><a href="../../base/src/GHC.Base.html#fmap"><span class="hs-identifier hs-var">fmap</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">(</span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;${pkgroot}&quot;</span></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
</span><a href="../../filepath/src/System.FilePath.Windows.html#%3C%2F%3E"><span class="hs-operator hs-var">&lt;/&gt;</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">(String -&gt; String) -&gt; (String -&gt; String) -&gt; String -&gt; String
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
</span><a href="Distribution.Simple.Utils.html#shortRelativePath"><span class="hs-identifier hs-var">shortRelativePath</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679724826"><span class="hs-identifier hs-var">pkgroot</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-563"></span><span>                </span><span class="annot"><span class="annottext">(InstallDirs String -&gt; InstallDirs String)
-&gt; InstallDirs String -&gt; InstallDirs String
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">PackageDescription
-&gt; LocalBuildInfo -&gt; UnitId -&gt; CopyDest -&gt; InstallDirs String
</span><a href="Distribution.Simple.LocalBuildInfo.html#absoluteComponentInstallDirs"><span class="hs-identifier hs-var">absoluteComponentInstallDirs</span></a></span><span> </span><span class="annot"><span class="annottext">PackageDescription
</span><a href="#local-6989586621679724831"><span class="hs-identifier hs-var">pkg</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679724828"><span class="hs-identifier hs-var">lbi</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ComponentLocalBuildInfo -&gt; UnitId
</span><a href="Distribution.Types.ComponentLocalBuildInfo.html#componentUnitId"><span class="hs-identifier hs-var hs-var">componentUnitId</span></a></span><span> </span><span class="annot"><span class="annottext">ComponentLocalBuildInfo
</span><a href="#local-6989586621679724827"><span class="hs-identifier hs-var">clbi</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">CopyDest
</span><a href="Distribution.Simple.InstallDirs.html#NoCopyDest"><span class="hs-identifier hs-var">NoCopyDest</span></a></span><span>
</span><span id="line-564"></span><span>
</span><span id="line-565"></span><span class="hs-comment">-- -----------------------------------------------------------------------------</span><span>
</span><span id="line-566"></span><span class="hs-comment">-- Unregistration</span><span>
</span><span id="line-567"></span><span>
</span><span id="line-568"></span><span class="annot"><a href="Distribution.Simple.Register.html#unregister"><span class="hs-identifier hs-type">unregister</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Types.PackageDescription.html#PackageDescription"><span class="hs-identifier hs-type">PackageDescription</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.LocalBuildInfo.html#LocalBuildInfo"><span class="hs-identifier hs-type">LocalBuildInfo</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.Setup.html#RegisterFlags"><span class="hs-identifier hs-type">RegisterFlags</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-569"></span><span id="unregister"><span class="annot"><span class="annottext">unregister :: PackageDescription -&gt; LocalBuildInfo -&gt; RegisterFlags -&gt; IO ()
</span><a href="Distribution.Simple.Register.html#unregister"><span class="hs-identifier hs-var hs-var">unregister</span></a></span></span><span> </span><span id="local-6989586621679724817"><span class="annot"><span class="annottext">PackageDescription
</span><a href="#local-6989586621679724817"><span class="hs-identifier hs-var">pkg</span></a></span></span><span> </span><span id="local-6989586621679724816"><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679724816"><span class="hs-identifier hs-var">lbi</span></a></span></span><span> </span><span id="local-6989586621679724815"><span class="annot"><span class="annottext">RegisterFlags
</span><a href="#local-6989586621679724815"><span class="hs-identifier hs-var">regFlags</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-570"></span><span>  </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621679724813"><span class="annot"><span class="annottext">pkgid :: PackageIdentifier
</span><a href="#local-6989586621679724813"><span class="hs-identifier hs-var hs-var">pkgid</span></a></span></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">PackageDescription -&gt; PackageIdentifier
forall pkg. Package pkg =&gt; pkg -&gt; PackageIdentifier
</span><a href="Distribution.Package.html#packageId"><span class="hs-identifier hs-var">packageId</span></a></span><span> </span><span class="annot"><span class="annottext">PackageDescription
</span><a href="#local-6989586621679724817"><span class="hs-identifier hs-var">pkg</span></a></span><span>
</span><span id="line-571"></span><span>      </span><span id="local-6989586621679724810"><span class="annot"><span class="annottext">genScript :: Bool
</span><a href="#local-6989586621679724810"><span class="hs-identifier hs-var hs-var">genScript</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Flag Bool -&gt; Bool
forall a. WithCallStack (Flag a -&gt; a)
</span><a href="Distribution.Simple.Flag.html#fromFlag"><span class="hs-identifier hs-var">fromFlag</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">RegisterFlags -&gt; Flag Bool
</span><a href="Distribution.Simple.Setup.html#regGenScript"><span class="hs-identifier hs-var hs-var">regGenScript</span></a></span><span> </span><span class="annot"><span class="annottext">RegisterFlags
</span><a href="#local-6989586621679724815"><span class="hs-identifier hs-var">regFlags</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-572"></span><span>      </span><span id="local-6989586621679724807"><span class="annot"><span class="annottext">verbosity :: Verbosity
</span><a href="#local-6989586621679724807"><span class="hs-identifier hs-var hs-var">verbosity</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Flag Verbosity -&gt; Verbosity
forall a. WithCallStack (Flag a -&gt; a)
</span><a href="Distribution.Simple.Flag.html#fromFlag"><span class="hs-identifier hs-var">fromFlag</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">RegisterFlags -&gt; Flag Verbosity
</span><a href="Distribution.Simple.Setup.html#regVerbosity"><span class="hs-identifier hs-var hs-var">regVerbosity</span></a></span><span> </span><span class="annot"><span class="annottext">RegisterFlags
</span><a href="#local-6989586621679724815"><span class="hs-identifier hs-var">regFlags</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-573"></span><span>      </span><span id="local-6989586621679724806"><span class="annot"><span class="annottext">packageDb :: PackageDB
</span><a href="#local-6989586621679724806"><span class="hs-identifier hs-var hs-var">packageDb</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">PackageDB -&gt; Flag PackageDB -&gt; PackageDB
forall a. a -&gt; Flag a -&gt; a
</span><a href="Distribution.Simple.Flag.html#fromFlagOrDefault"><span class="hs-identifier hs-var">fromFlagOrDefault</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">PackageDBStack -&gt; PackageDB
</span><a href="Distribution.Simple.Compiler.html#registrationPackageDB"><span class="hs-identifier hs-var">registrationPackageDB</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">LocalBuildInfo -&gt; PackageDBStack
</span><a href="Distribution.Types.LocalBuildInfo.html#withPackageDB"><span class="hs-identifier hs-var hs-var">withPackageDB</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679724816"><span class="hs-identifier hs-var">lbi</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-574"></span><span>                                    </span><span class="hs-special">(</span><span class="annot"><span class="annottext">RegisterFlags -&gt; Flag PackageDB
</span><a href="Distribution.Simple.Setup.html#regPackageDB"><span class="hs-identifier hs-var hs-var">regPackageDB</span></a></span><span> </span><span class="annot"><span class="annottext">RegisterFlags
</span><a href="#local-6989586621679724815"><span class="hs-identifier hs-var">regFlags</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-575"></span><span>      </span><span id="local-6989586621679724804"><span class="annot"><span class="annottext">unreg :: HcPkgInfo -&gt; IO ()
</span><a href="#local-6989586621679724804"><span class="hs-identifier hs-var hs-var">unreg</span></a></span></span><span> </span><span id="local-6989586621679724803"><span class="annot"><span class="annottext">HcPkgInfo
</span><a href="#local-6989586621679724803"><span class="hs-identifier hs-var">hpi</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-576"></span><span>        </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621679724802"><span class="annot"><span class="annottext">invocation :: ProgramInvocation
</span><a href="#local-6989586621679724802"><span class="hs-identifier hs-var hs-var">invocation</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">HcPkgInfo
-&gt; Verbosity -&gt; PackageDB -&gt; PackageIdentifier -&gt; ProgramInvocation
</span><a href="Distribution.Simple.Program.HcPkg.html#unregisterInvocation"><span class="hs-identifier hs-var">HcPkg.unregisterInvocation</span></a></span><span>
</span><span id="line-577"></span><span>                           </span><span class="annot"><span class="annottext">HcPkgInfo
</span><a href="#local-6989586621679724803"><span class="hs-identifier hs-var">hpi</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="Distribution.Verbosity.html#normal"><span class="hs-identifier hs-var">Verbosity.normal</span></a></span><span> </span><span class="annot"><span class="annottext">PackageDB
</span><a href="#local-6989586621679724806"><span class="hs-identifier hs-var">packageDb</span></a></span><span> </span><span class="annot"><span class="annottext">PackageIdentifier
</span><a href="#local-6989586621679724813"><span class="hs-identifier hs-var">pkgid</span></a></span><span>
</span><span id="line-578"></span><span>        </span><span class="hs-keyword">in</span><span> </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679724810"><span class="hs-identifier hs-var">genScript</span></a></span><span>
</span><span id="line-579"></span><span>             </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">String -&gt; ByteString -&gt; IO ()
</span><a href="Distribution.Utils.Generic.html#writeFileAtomic"><span class="hs-identifier hs-var">writeFileAtomic</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="Distribution.Simple.Register.html#unregScriptFileName"><span class="hs-identifier hs-var">unregScriptFileName</span></a></span><span>
</span><span id="line-580"></span><span>                    </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; ByteString
</span><a href="../../bytestring/src/Data.ByteString.Lazy.Char8.html#pack"><span class="hs-identifier hs-var">BS.Char8.pack</span></a></span><span> </span><span class="annot"><span class="annottext">(String -&gt; ByteString) -&gt; String -&gt; ByteString
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">OS -&gt; ProgramInvocation -&gt; String
</span><a href="Distribution.Simple.Program.Script.html#invocationAsSystemScript"><span class="hs-identifier hs-var">invocationAsSystemScript</span></a></span><span> </span><span class="annot"><span class="annottext">OS
</span><a href="Distribution.System.html#buildOS"><span class="hs-identifier hs-var">buildOS</span></a></span><span> </span><span class="annot"><span class="annottext">ProgramInvocation
</span><a href="#local-6989586621679724802"><span class="hs-identifier hs-var">invocation</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-581"></span><span>             </span><span class="hs-keyword">else</span><span> </span><span class="annot"><span class="annottext">Verbosity -&gt; ProgramInvocation -&gt; IO ()
</span><a href="Distribution.Simple.Program.Run.html#runProgramInvocation"><span class="hs-identifier hs-var">runProgramInvocation</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679724807"><span class="hs-identifier hs-var">verbosity</span></a></span><span> </span><span class="annot"><span class="annottext">ProgramInvocation
</span><a href="#local-6989586621679724802"><span class="hs-identifier hs-var">invocation</span></a></span><span>
</span><span id="line-582"></span><span>  </span><span class="annot"><span class="annottext">Verbosity -&gt; String -&gt; PackageIdentifier -&gt; IO ()
</span><a href="Distribution.Simple.Utils.html#setupMessage"><span class="hs-identifier hs-var">setupMessage</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679724807"><span class="hs-identifier hs-var">verbosity</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Unregistering&quot;</span></span><span> </span><span class="annot"><span class="annottext">PackageIdentifier
</span><a href="#local-6989586621679724813"><span class="hs-identifier hs-var">pkgid</span></a></span><span>
</span><span id="line-583"></span><span>  </span><span class="annot"><span class="annottext">Verbosity
-&gt; String -&gt; Compiler -&gt; ProgramDb -&gt; (HcPkgInfo -&gt; IO ()) -&gt; IO ()
forall a.
Verbosity
-&gt; String -&gt; Compiler -&gt; ProgramDb -&gt; (HcPkgInfo -&gt; IO a) -&gt; IO a
</span><a href="Distribution.Simple.Register.html#withHcPkg"><span class="hs-identifier hs-var">withHcPkg</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679724807"><span class="hs-identifier hs-var">verbosity</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;unregistering is only implemented for GHC and GHCJS&quot;</span></span><span>
</span><span id="line-584"></span><span>    </span><span class="hs-special">(</span><span class="annot"><span class="annottext">LocalBuildInfo -&gt; Compiler
</span><a href="Distribution.Types.LocalBuildInfo.html#compiler"><span class="hs-identifier hs-var hs-var">compiler</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679724816"><span class="hs-identifier hs-var">lbi</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">LocalBuildInfo -&gt; ProgramDb
</span><a href="Distribution.Types.LocalBuildInfo.html#withPrograms"><span class="hs-identifier hs-var hs-var">withPrograms</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679724816"><span class="hs-identifier hs-var">lbi</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">HcPkgInfo -&gt; IO ()
</span><a href="#local-6989586621679724804"><span class="hs-identifier hs-var">unreg</span></a></span><span>
</span><span id="line-585"></span><span>
</span><span id="line-586"></span><span class="annot"><a href="Distribution.Simple.Register.html#unregScriptFileName"><span class="hs-identifier hs-type">unregScriptFileName</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.IO.html#FilePath"><span class="hs-identifier hs-type">FilePath</span></a></span><span>
</span><span id="line-587"></span><span id="unregScriptFileName"><span class="annot"><span class="annottext">unregScriptFileName :: String
</span><a href="Distribution.Simple.Register.html#unregScriptFileName"><span class="hs-identifier hs-var hs-var">unregScriptFileName</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">OS
</span><a href="Distribution.System.html#buildOS"><span class="hs-identifier hs-var">buildOS</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-588"></span><span>                          </span><span class="annot"><span class="annottext">OS
</span><a href="Distribution.System.html#Windows"><span class="hs-identifier hs-var">Windows</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;unregister.bat&quot;</span></span><span>
</span><span id="line-589"></span><span>                          </span><span class="annot"><span class="annottext">OS
</span><span class="hs-identifier">_</span></span><span>       </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;unregister.sh&quot;</span></span><span>
</span><span id="line-590"></span><span>
</span><span id="line-591"></span><span class="annot"><a href="Distribution.Simple.Register.html#internalPackageDBPath"><span class="hs-identifier hs-type">internalPackageDBPath</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Types.LocalBuildInfo.html#LocalBuildInfo"><span class="hs-identifier hs-type">LocalBuildInfo</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.IO.html#FilePath"><span class="hs-identifier hs-type">FilePath</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.IO.html#FilePath"><span class="hs-identifier hs-type">FilePath</span></a></span><span>
</span><span id="line-592"></span><span id="internalPackageDBPath"><span class="annot"><span class="annottext">internalPackageDBPath :: LocalBuildInfo -&gt; String -&gt; String
</span><a href="Distribution.Simple.Register.html#internalPackageDBPath"><span class="hs-identifier hs-var hs-var">internalPackageDBPath</span></a></span></span><span> </span><span id="local-6989586621679724795"><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679724795"><span class="hs-identifier hs-var">lbi</span></a></span></span><span> </span><span id="local-6989586621679724794"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679724794"><span class="hs-identifier hs-var">distPref</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-593"></span><span>      </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Compiler -&gt; CompilerFlavor
</span><a href="Distribution.Simple.Compiler.html#compilerFlavor"><span class="hs-identifier hs-var">compilerFlavor</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">LocalBuildInfo -&gt; Compiler
</span><a href="Distribution.Types.LocalBuildInfo.html#compiler"><span class="hs-identifier hs-var hs-var">compiler</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679724795"><span class="hs-identifier hs-var">lbi</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-594"></span><span>        </span><span class="annot"><span class="annottext">CompilerFlavor
</span><a href="Distribution.Compiler.html#UHC"><span class="hs-identifier hs-var">UHC</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo -&gt; String
</span><a href="Distribution.Simple.UHC.html#inplacePackageDbPath"><span class="hs-identifier hs-var">UHC.inplacePackageDbPath</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679724795"><span class="hs-identifier hs-var">lbi</span></a></span><span>
</span><span id="line-595"></span><span>        </span><span class="annot"><span class="annottext">CompilerFlavor
</span><span class="hs-identifier">_</span></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679724794"><span class="hs-identifier hs-var">distPref</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
</span><a href="../../filepath/src/System.FilePath.Windows.html#%3C%2F%3E"><span class="hs-operator hs-var">&lt;/&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;package.conf.inplace&quot;</span></span><span>
</span><span id="line-596"></span></pre></body></html>